[Therion] Therion Digest, Vol 83, Issue 18

Dave Clucas dave at daveclucas.com
Fri Nov 16 14:02:42 CET 2012


I took a look at Bruce's code, in particular Code to redefine area and  
point water symbols
.
This looks like something I'd like to use but how and where do I  
define the colour eg.

     if known colour_water_bg: thfill Path withcolor colour_water_bg;  
else: thfill Path withcolor white; fi;



On 16 Nov 2012, at 11:00, therion-request at speleo.sk wrote:

> Send Therion mailing list submissions to
> 	therion at speleo.sk
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://mailman.speleo.sk/mailman/listinfo/therion
> or, via email, send a message with subject or body 'help' to
> 	therion-request at speleo.sk
>
> You can reach the person managing the list at
> 	therion-owner at speleo.sk
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Therion digest..."
>
>
> Today's Topics:
>
>   1. Metapost modifications (Dave Clucas)
>   2. Re: Metapost modifications (Footleg)
>   3. Re: Metapost modifications (Dave Clucas)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 16 Nov 2012 09:28:17 +0000
> From: Dave Clucas <dave at daveclucas.com>
> Subject: [Therion] Metapost modifications
> To: therion at speleo.sk
> Message-ID: <669F7863-965F-4631-9398-DBDB3CCFB323 at daveclucas.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> In Mulu many of the passages are part filled with sandstone pebbles.
> I'd like to create a user area and a user symbol based on pebbles
> where the ellipses are filled with a colour (light brown). Can anybody
> tell me how to modify the standard definition?
>
> Dave Clucas
> dave at daveclucas.com
> http://daveclucas.com
> http://mycaves.org
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 16 Nov 2012 09:39:17 +0000
> From: Footleg <drfootleg at gmail.com>
> Subject: Re: [Therion] Metapost modifications
> To: List for Therion users <therion at speleo.sk>
> Message-ID:
> 	<CAJkGg4ny0XGoxkb+5QxjM_N1Q4GjjjhrwwfrohBoxQLhxmmEfQ at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Take a look at Bruce's customised symbol sets on the wiki. I based  
> mine on
> those. I have not tried adding a completely new symbol to therion  
> yet, but
> here is how I override the pebbles area fill with one which looks  
> more like
> I prefer. Include this layout in your pdf export command to see  
> pebbles
> rendered with this custom style:
>
> layout CustomisedSymbols
>  code metapost
>
> beginpattern(pattern_pebbles);
> pickup PenC;
> path qq;
> for i=0.0u step 0.6u until 5.1u:
> for j=0.0u step 0.6u until 5.1u:
>  qq := (superellipse((.05u,0),(0,.05u),(-.05u,0),(0,.-.05u),.75))
> randomized (u/45)
> scaled (uniformdeviate(1.2)+.55)
> rotated uniformdeviate(360)
> shifted ((i,j) randomized 0.55u);
>   draw qq;
> endfor;
> endfor;
> patternstep(5.1u,5.1u);
> endpattern;
>
> def a_pebbles (expr p) =
> T:=identity;
> thfill p withpattern pattern_pebbles;
> enddef;
>
>  endcode
> endlayout CustomisedSymbols
>
>
> On 16 November 2012 09:28, Dave Clucas <dave at daveclucas.com> wrote:
>
>> In Mulu many of the passages are part filled with sandstone  
>> pebbles. I'd
>> like to create a user area and a user symbol based on pebbles where  
>> the
>> ellipses are filled with a colour (light brown). Can anybody tell  
>> me how to
>> modify the standard definition?
>>
>> Dave Clucas
>> dave at daveclucas.com
>> http://daveclucas.com
>> http://mycaves.org
>>
>>
>>
>> ______________________________**_________________
>> Therion mailing list
>> Therion at speleo.sk
>> http://mailman.speleo.sk/**mailman/listinfo/therion<http://mailman.speleo.sk/mailman/listinfo/therion 
>> >
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20121116/f597890d/attachment.html 
> >
>
> ------------------------------
>
> Message: 3
> Date: Fri, 16 Nov 2012 10:04:22 +0000
> From: Dave Clucas <dave at daveclucas.com>
> Subject: Re: [Therion] Metapost modifications
> To: therion at speleo.sk
> Message-ID: <DD6A17E1-D0AE-47B9-801D-92792FBCA12D at daveclucas.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> I've answered my own question. It was a lot easier than I expected!
>
> code metapost
>   def a_u_pebbles (expr p) =
>  T:=identity;
>  pickup PenC;
>  path q, qq; q = bbox p;
>  picture tmp_pic;
>  tmp_pic := image(
>    for i = xpart llcorner q step 1.5u until xpart urcorner q:
>      for j = ypart llcorner q step 1.5u until ypart urcorner q:
>        qq := (superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75))
> %             randomized (u/25)
>             rotated uniformdeviate(360)
>             shifted ((i,j) randomized 0.8u);
> 	if xpart (p intersectiontimes qq) < 0:
> 	  thdraw qq;
> 	  thfill qq withcolor(1, 0.85, 0.83);
> 	fi;
>      endfor;
>    endfor;
>  );
>  clip tmp_pic to p;
>  draw tmp_pic;
> enddef;
>
> def p_u_pebbles (expr pos,theta,sc,al)=
>    U:=(.45u,.35u);
>    T:=identity aligned al rotated theta scaled sc shifted pos;
>    pickup PenC;
>    p:=superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75);
>    thdraw p rotated 20 shifted (0,.25u);
>    thfill p rotated 20 shifted (0,.25u) withcolor(1, 0.85, 0.83);
>    thdraw p rotated -37 shifted (.25u,-.25u);
>    thfill p rotated -37 shifted (.25u,-.25u) withcolor(1, 0.85, 0.83);
>    thdraw p rotated -62 shifted (-.25u,-.25u);
>    thfill p rotated -62 shifted (-.25u,-.25u) withcolor(1, 0.85,  
> 0.83);
> enddef;
>
> endcode
>
> On 16 Nov 2012, at 09:28, Dave Clucas wrote:
>
>> In Mulu many of the passages are part filled with sandstone pebbles.
>> I'd like to create a user area and a user symbol based on pebbles
>> where the ellipses are filled with a colour (light brown). Can
>> anybody tell me how to modify the standard definition?
>>
>> Dave Clucas
>> dave at daveclucas.com
>> http://daveclucas.com
>> http://mycaves.org
>>
>>
>>
>
> Dave Clucas
> dave at daveclucas.com
> http://daveclucas.com
> http://mycaves.org
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> http://mailman.speleo.sk/mailman/listinfo/therion
>
>
> End of Therion Digest, Vol 83, Issue 18
> ***************************************

Dave Clucas
dave at daveclucas.com
http://daveclucas.com
http://mycaves.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20121116/0c1c0ff0/attachment.htm>


More information about the Therion mailing list