[metapost] Metapost and directions

Hartmut Henkel hartmut_henkel at gmx.de
Fri Apr 25 00:49:48 CEST 2008


On Thu, 24 Apr 2008, yves geunes wrote:

> I am using metapost to create charts.
> I noticed that
>
> draw (-my_unit,0)--(my_unit,0);
> ray[1]=(0,0) -- my_unit*2*dir 0.0000;
> draw ray[1];
>
> produces 2 lines on top of each other
> but when I leave the origin and shift things:
>
> draw (-my_unit,100)--(my_unit,100);
> ray[1]=(0,100) -- my_unit*2*dir 0.0000;
> draw ray[1];
>
> the ray[1] is slightly angled.

maybe in the 2nd case you mean:

ray[1]:=(0,100) -- (0,100)+my_unit*2*dir 0.0000;

Regards, Hartmut


More information about the metapost mailing list