Closed Kcnarf closed 6 years ago
Yes; D3 uses the default coordinate system of Canvas and SVG, which is +x pointing right and +y pointing down.
Fine. Thanks for your clarification.
I will refactor the d3-weighted-voronoi (and subsequently d3-voronoi-map/d3-voronoi-treemap) plugin in order to fulfill this convention.
The test below shows that the expected result is clockwise, not counterclockwise as mention in the documentation.
https://github.com/d3/d3-polygon/blob/1bfcdc8b63578b936c785639fa73cec566713c45/test/hull-test.js#L12
Is it due to the fact that the y-axis direction of SVGs is going down the screen, and hence inverting some common computation results ?