luigi scarso wrote:
On Wed, Nov 25, 2009 at 5:45 AM, Curiouslearn
wrote: The code below shows a cyclic path that I am interested in creating (it is in red if you run the code). The example works fine as long as I have, u:=1cm, as in the code below. But if I replace it by , u:=0.6cm, there is no output. There is an error saying that paths 4 and 3 do not intersect. Is this a bug?
More a 'known limitation': intersection point calculations are not perfect because of the fixed precision calculus. Lint[4] is the culprit. With u=0.6cm it has these coordinates: (170.07976,0.00014). Notice how the y coordinate is not actually on the xaxis? That is because the actual intersection between stLine and xaxis does not fit nicely into a scaled pair, so metapost takes the 'closest approximation', which in this case is slightly off both lines. The solution is to add an explicit fix to Lint[4] just after its current assignment: Lint[4]:=(xpart Lint[4], 0); This is not pretty, and one of the problems we hope to solve with metapost 2.0. Best wishes, Taco