[Therion] Austrian Symbol-Set

Georg Pacher gpacher at sbox.tugraz.at
Wed Nov 26 23:14:09 CET 2008


Martin Sluka schrieb:
> I'm able to do it in Illustrator, but how to program it for MetaPost?
>
> from bottom:
>
> 1. Make path.
>
> 2. Make thickest line on path.
>
> 3. Make mask on that path - it should cut the inner part of line
>
> 4. Make thick line on path
>
> 5. Make thin white line on path

Yes, this works well!
I'm not sure if it's possible to mask only the path and not the entire 
enclosed area, but that doesn't matter much I think.
One can put the entrance pit to the beginning of the .th2 file.

thanks,
Georg

Ps.: the metapost code I used:

def PenXXL = pencircle scaled (2.4*u/10) enddef;

def l_pit (expr P) =
  T:=identity;
#draw the two lines
  pickup PenXXL;
  thdraw P;
  thclean P;
  pickup PenX;
  thdraw P;
  pickup PenC;
  thdraw P withcolor (1,1,1);

 # draw triangles
  laenge:= arclength P;
  symsize:=0.5u;
  triangle_width:=symsize/2;
 
  pair l_triangle;
  pair f_triangle;
  pair test;
  path triangle;
  path draw_triangle;
  triangle:= (-triangle_width/2,0) -- (triangle_width/2,0) --
                (0,symsize/2) -- cycle;
  cur:=(symsize);
 
  t := arctime (cur) of P;
  f_triangle := (point t of P +.05u*unitvector(thdir(P,t) rotated 90));
  thfill triangle rotated angle thdir(P,t) shifted f_triangle ;
  l_triangle := f_triangle;
 
  for cur=(symsize) step 0.1 until laenge:
    t := arctime (cur) of P;
    test := (point t of P +.05u*unitvector(thdir(P,t) rotated 90));
    my_dist := distance(test,l_triangle);
   # show my_dist;
    if abs(my_dist-symsize) < 0.05u:
    draw_triangle:=triangle rotated angle thdir(P,t) shifted test;
      if xpart (draw_triangle intersectiontimes P) < 0:
        thfill triangle rotated angle thdir(P,t) shifted test;
        l_triangle:= test;
      fi;
    fi;
  endfor;
enddef;





-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pdf
Type: application/pdf
Size: 9723 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20081126/988cbaf4/attachment.pdf>


More information about the Therion mailing list