-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent broken projection of a 4 - segment beach ball #42
Comments
Is it maybe the same problem as #22? |
I think they maybe the same... but I am going to temporarily keep this issue open as I think my desciption below give us a very spefiic route to highlight a very small section of buggy code.... I am having to balance many jobs at the moment so I am just going to document what I have found .. so that I can come back to it later. In the screenshot below I am showing the quadpole from these 4 points/sites which are shown as circle in the images below. [ [-20, -20], [20, -20], [20, 20], [-20,20]] ( degrees ) I have cancelled the animation by commenting out this line
I have debug this to the point where I can say the missing segments of the beach ball are being projected to a line ... it is a line from the center of the image just under the top right site. Secondly I have watched the rotation by adjusting
to become whatever I choose the image changes as expected from 0 until 12.47 show just a slight rotation.
but when I move to 12.48 the nature of the bug changes instead of projecting a one quater segment of the beach ball to a line ... a three quaters segment of a beach ball is incorreclty displayed.. this is green section of the second image. Anyway now we have a very specific change between two broken outcomes If this description makes the solution jump out at you please let me know. I will debug this more when I have the time. |
the issue is that here we have two centers ([0,0] and [180,0]), and we need to connect them back and forth, and each time through a different great circle, which we need to give explicitly since the two points are antipodal. |
Before I begin, I should note that the code quality of this module is high
and I really like the attention to detail that is apparent in the test coverage.
So I should say I am talking about bug .. which has slipped through high quality testing.
I found this as I am porting this module to rust.. my port has alsmost the same coverage as the original but a whole set of new bugs
So I am developing new test patterns to identify problems with my rust - and I have found a pattern which breaks the javascript version.
I have provded two branches which hightlight the problem.
The branches modify the benchmarks
The problem can be exposed from the branches by opening in a browser the file ./benchmark/sphereCanvas.html
[from the project root directory]
[The benchmarks normal function is rendering a rotating sphere with a number of random point under the control of the user ... ]
Senario A
A have created a new branch showing the bug.
https://github.com/martinfrances107/d3-geo-voronoi/tree/broken_4_segment_beech_ball
A rotating sphere with 4 sites to display a 4 - segment beach ball. With sites at
[ [-20, -20], [20, -20], [20, 20], [-20,20]] ( degrees )
as can be seen in this branch .. the rotation is all flickerey it appears, at times, that not all of the of the 4 items are returned by the call to poloygon().
Senario B
https://github.com/martinfrances107/d3-geo-voronoi/tree/offset_4_segment_beach_ball
The position of the sites is offset just slightly .. the flicker is disappears and the slightly wonky beach ball is rendered consitently.
[ [-15, -20], [20, -20], [20, 20], [-20,20]] ( degrees )
The text was updated successfully, but these errors were encountered: