[NTG-context] Check if two paths intersect in Metafun
Jairo A. del Rio
jairoadelrio6 at gmail.com
Fri Dec 25 14:48:25 CET 2020
Hi, list. I've got a question about paths and intersections. The following:
\starttext
\startMPpage
path p[];
p[1] = fullcircle scaled 2cm;
p[2] = unitsquare shifted (4cm,6cm);
if (known (p[1] intersectionpoint p[2])):
draw textext("yes");
else:
draw textext("no");
fi;
\stopMPpage
\stoptext
yields an error message: "The paths don't intersect". Is there a way to
intercept this error message and trigger an action instead? Thank you in
advance.
Best regards,
Jairo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20201225/35e2ef9e/attachment.htm>
More information about the ntg-context
mailing list