I just wanted to share this code. Haven’t figured out how it works really, just wanted to learn about how to calculate a voronoi. But for now I settle with some code written for corona I think, but adapted for codea. It can be used for creating a procedural island for example.
Sometimes i just want to find solutions that are clean and clear. This is a bit messy with having the beach line in order, search google to find descriptions on the algorithm…
@tnlogy I was looking at something like this about a year ago. It had random points on the screen and a base line that was drawn across the screen. The line would start at the top of the screen and as the line moved down the screen and crossed a random point, a parabola would be drawn like the wake from a boat. Where multiple parabolas touched, a line would be drawn that created the web like feature that you display in your example. Yours is drawing the web a lot faster than the parabola example was. But then I think the parabola example wasn’t meant to be fast.
This is the same algorithm as the wikipedia article illustrates. I would be slower if it animated the web moving across the screen. I think it is messy with all the needed special cases though.