Settings

Theme

SDFs and the Fast sweeping algorithm in Jax

rohangautam.github.io

39 points by beansbeansbeans 8 months ago · 7 comments

Reader

singron 8 months ago

You might also be interested in JFA https://en.m.wikipedia.org/wiki/Jump_flooding_algorithm

  • cyber_kinetist 8 months ago

    As a bonus: the vanilla JFA can only calculate unsigned distances, but you can extend this to signed distance computation using a simple trick: by inverting your JFA result and setting it as the seed for running a second DFA. (See https://blog.demofox.org/2016/03/02/actually-making-signed-d... for a better explanation)

  • beansbeansbeansOP 8 months ago

    Thats a cool algorithm!! I couldnt find resources on how it might be used to compute distance functions (though it seems like it can). It seems to be for approximating voronoi diagrams.

    • singron 8 months ago

      The two problems are highly related, which is why it can do both. At the end of the algorithm, you have a per-pixel assignment of the (approximately) closest seed pixel. If you want a voronoi diagram, then you color each pixel according to the identify of its seed pixel. If you want a distance function, then you color it with the distance to that pixel.

andybak 8 months ago

First skim and I'm confused about the meaning of "interface" in this context. Anyone?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection