- Distance Transform Algorithm – to think about GPUs, parallelism
- Distance Transform Applications – to think about AI
- Noise – a useful topic, but cute tricks
Distance Transform Algorithm
Review Danielson EDT (linear time)
- linear but serial (and linear in # of pixels, not edge size)
equivalence to vornoi diagrams
Introduce propagation algorithm
- fast implementations with priority queues
- parallel implementation (flooding)
- look at neighbors (local computation)
- edge length passes (as opposed to #pixels)
- makes sense if you have a massively parallel machine
- doubling (1,2,4) – log N fill
- halving (8,4,3,1) – log N fill (if you start with log N)
- jump flood (x+i, y+i) I in (log N … 1)
- not exact (gets some edge cases wrong)
- provably very close – extra pass or two gets very close
- log N passes (each one linear in pixels amount of work)
- http://www.comp.nus.edu.sg/~tants/jfa.html
What might you use this for?
- gradients – tell you how to get away (avoid)
- collisions
- grow obstacles, shrink objects (point querries)
- navigation
- find low cost paths (draw lines and adapt)
- influence maps
Perlin Noise