[metapost] Some observations on turning and self intersection

Giuseppe Bilotta gip.bilotta at iol.it
Sun Feb 6 00:40:45 CET 2005


Saturday, February 5, 2005 Werner LEMBERG wrote:

>> The condition for a loop is then  (a x c)^2 < 4(a x b)(b x c).

> The disadvantage of computing the cross product is that its components
> can become very large.

IIRC MF/MP is able to calculate sine and cosine of angles
between vectors; if this is indeed the case, the explicit
formula

|a||c| sin^2(a->c) < 4 |b|^2 sin(a->b) sin (b->c)

should be less sensitive to buffer overflows ...

-- 
Giuseppe "Oblomov" Bilotta




More information about the metapost mailing list