autotwin / automesh

Automatic mesh generation.
https://autotwin.github.io/automesh
MIT License
1 stars 1 forks source link

Note on quadtree convention #209

Open hovey opened 4 days ago

hovey commented 4 days ago

Hey @mrbuche I may have mislead you earlier... I was reviewing some literature, and found that there is convention that if a seed lies on the boundary of a cell, it is considered "inside" the cell if the seed lies on the bottom edge or left edge, and "outside" the cell if the cell lies on the top edge or right edge... so this line below and the line twice below it may need updates from <= to <,

https://github.com/autotwin/automesh/blob/c2b0d5f4895265322f8a2b16562cd821d0cd030f/tests/foo.rs#L23

https://github.com/autotwin/automesh/blob/c2b0d5f4895265322f8a2b16562cd821d0cd030f/tests/foo.rs#L25

But then again, maybe we find, on our journey toward balancing the tree, that we want to use <= instead of the traditional convention because we will wind up balancing it anyway... dunno, just wanted to communicate the convention for now. :-)

hovey commented 4 days ago

One more note on indexing, binary space partitioning quadtree for a 2D index, https://en.wikipedia.org/wiki/Quadtree,

Screenshot 2024-11-15 at 22 32 03