Skip to content

Potential refactor of outer billiards machinery - #79

Open
davidjamesromano wants to merge 5 commits into
2swap:masterfrom
davidjamesromano:outer-billiards-video
Open

Potential refactor of outer billiards machinery#79
davidjamesromano wants to merge 5 commits into
2swap:masterfrom
davidjamesromano:outer-billiards-video

Conversation

@davidjamesromano

Copy link
Copy Markdown
Contributor

Bug fix: The areas where the singularities would go were cutting color from where it should have been. This has been fixed.

Singularities don't need their own geometry. Pivot is undefined exactly where corners tie for clockwise, and the pivot search already computes how close the time comes, so SingularRay and everything associated with it is gone. Definitely tidied up the code a bit.

Bumped max period from 100 to 500 to resolve the bug with odd coloring. Increase this for better results and slower performance.

It was taking whichever of the first 100 hops landed nearest to the start and
calling that the period, so points whose orbit never closed still got colored.
That is what was breaking the far left and right of the frame - they are the
only parts far enough from the table for a period to run past 100. Raised the
limit to 300, since the real periods out there reach about 150.
The borders were being cut out of the color layer rather than drawn on top of
it, so they were really just gaps letting the background through. They were
also cut three times deeper than the white lines meant to cover them, and got
cut even when those lines were turned off.
Most orbits close well before the step limit, so there is no point walking the
rest of it after the period is found and the lines are drawn.
The pivot is undefined exactly where two corners tie for clockwise-most, so how
close that tie comes is how close the singularity is - and that is the same
number the pivot search already computes. The ray structs, the code that builds
them, and the copy of them to the GPU all go away.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant