[metapost] arrowhead weirdness

Hartmut Henkel hartmut_henkel at gmx.de
Fri Aug 15 21:03:27 CEST 2008


On Fri, 15 Aug 2008, Oliver Buerschaper wrote:

> while experimenting with arrow heads I've stumbled upon something that
> puzzles me:
>
> ---
> u := 0.5cm;
> path p;
> p := origin--(5u,0);
> ahlength := 2u/sind(ahangle);

it's

ahlength := u/sind(ahangle/2);

> pickup pencircle scaled u;
> drawarrow p;
> draw p yshifted u withpen pencircle scaled 0.1bp withcolor red;
> draw p yshifted u/2 withpen pencircle scaled 0.1bp withcolor red;
> undraw p withpen pencircle scaled 0.1bp;
> undraw arrowhead p withpen pencircle scaled 0.1bp;
> ---
>
> Shouldn't the upper corner of the white arrowhead path lie on the red
> line? Would be grateful if someone could point me to what I'm missing ?

Regards, Hartmut


More information about the metapost mailing list