[metapost] Limited precision -- Megapost

Hans Hagen pragma at wxs.nl
Mon Jan 24 09:35:24 CET 2011

On 24-1-2011 8:57, navarro at us.es wrote:
> Thanks for the responses about my not-very-precise request on "Limited
> precision  -- Megapost"
> I am drawing some pictures of light beams falling on different geometric
> shapes, like parabolas and hyperbolas and "calculating" the reflected beam
> and, when there are a few reflections involved, I have noticed that these
> reflected beams fail to pass through the foci of the conics. I think this
> has to do with precision problems when calculating the intersections of paths, but
> it can also be due to the representation by cubics, since the conics are
> drawn by the path joining a few points. I will see if I can do a bit "fine
> tuning" on this to get acceptable results.

Calculating intersection points is always sensitive for precision. I 
wonder if mega helps there, unless the intersection routines are adapted 
to work on less digits (or some large eps).


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the metapost mailing list