Skip to content

Polygon edges do not intersect error #13

Answered by cduck
mireiattt asked this question in Q&A
Discussion options

You must be logged in to vote

This sounds like a rounding error. Are you using Integer and RealNumber to avoid rouding errors? This library hasn't been designed with special number types in mind so that may or may not help.

The reason you get the polygon error is because the hwidth parameter converts your line into a hyperbolic "rectangle" before drawing it. Rounding error must be causing the computed sides of this rectangle to not quite intersect. One end of the line may be very close to the boundary of the Poincare disk.

Why are you drawing polygons up to depth 25? Anything after 15 or so will be extremely tiny (smaller than a pixel) depending on the rendered resolution.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mireiattt
Comment options

@cduck
Comment options

Answer selected by cduck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants