autotwin / automesh

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

Quadtree balancing #208

Open hovey opened 2 days ago

hovey commented 2 days ago

https://youtu.be/Ac47eHdSZuE

See also slides https://i11www.iti.kit.edu/_media/teaching/winter2015/compgeom/algogeom-ws15-vl11-printable.pdf

hovey commented 2 days ago

For a quadtree with a cell that contains two points, the maximum level $h$ of the quadtree is known. (See proof: https://youtu.be/Ac47eHdSZuE?si=rM5Zie3K_07I4hmO&t=750)

Then, $c \leq c_{\max}$, thus

$c \leq \sqrt{2} \left( s / 2^h \right) $

$\frac{c}{s \sqrt{2}} \leq 0.5^h $

let $L = \frac{c}{s \sqrt{2}}$

$\ln(L) \leq h \ln(0.5)$

$h \leq \frac{\ln(L)}{\ln(0.5)}$

Example, let $s = 1$ and $c = \sqrt{2}/4$, then $L = \frac{1}{4}$ and

$h \leq \frac{\ln(0.25)}{\ln(0.5)}$

$h \leq 2$

hovey commented 2 days ago

Finding neighbors:

https://youtu.be/Ac47eHdSZuE?si=UFh8oFtydPextoxy&t=854

hovey commented 2 days ago

Balanced quad trees:

https://youtu.be/Ac47eHdSZuE?si=xmp4TFIS1LpqnQ_7&t=1027

hovey commented 2 days ago

Neighbor finding: https://faculty.sites.iastate.edu/jia/files/inline-files/29.%20quadtrees.pdf page 76/111

hovey commented 2 days ago

Balancing algorithm, https://faculty.sites.iastate.edu/jia/files/inline-files/29.%20quadtrees.pdf page 95/111