|
|
|
|
|
by omoikane
962 days ago
|
|
My favorite algorithm for generating Voronoi diagrams is the Jumping flood algorithm: https://en.wikipedia.org/wiki/Jump_flooding_algorithm This is an approximate algorithm that only works in pixel space, but it's lots of fun to implement (simpler to implement than Fortune's algorithm). |
|
Just ignore Big O analysis. I guarantee any kind of GPU will blow all CPU algorithms out of the water. This has been known for at least 30 years - I believe there was an SGI demo of it back in the day.
OpenGL can also do edge detection image processing (Laplacian convolution) and give you the line boundaries, if that's what you need. Perhaps a jittered double-rendering can give the same result.
If the resolution is not enough, just multiply the canvas size - x2, x4 ... it will still be faster.