[metapost] Extending a path

Yasir Malik ymalik at stevens.edu
Fri Nov 12 00:17:03 CET 2010


> Or if you want to extend pp with a straight line for
> a distance d:
>  path qq;
>  n := length pp;
>  qq := (0,0)--(d*unitvector(direction n of pp));
>  pp & (qq shifted point n of pp)
>
Thanks, that's what I needed.  I needed to extend a path with a line with 
the same slope.

Thanks,
Yasir


More information about the metapost mailing list