[metapost] (newbie) macro with a sequence of pairs

Taco Hoekwater taco at elvenkind.com
Tue Dec 15 09:03:54 CET 2009


luigi scarso wrote:
> I'm pretty new about metapost programming
> and I need to write a "polyline" macro
> that take a with a "sequence of pairs"  like
> (0,0) (10,10) (30,10)
> and draw  a line
> ie
> polyline (0,0) (10,10) (30,10)
> is
> draw (0,0)--(10,10)--(30,30)
> 
>  Is it possible ?

Not without a lot of trickery, I think. Why do you
not want to use
	
   polyline (0,0)--(10,10)--(30,30);

?

Best wishes,
Taco


More information about the metapost mailing list