javascriptgenerative-art

What would be the math associated for creating lines like in this image?


I really could use some help in the right direction with this. Thanks!

enter image description here


Solution

  • I think that this looks like a Voronoi diagram, or some custom implementation of one, which divides a plane with lots of points into discrete areas.

    Voronoi diagram

    There are several algorithms for generating these diagrams, and you may want to take a look at this question to get an idea of what is easiest to implement. Fortune's algorithm is probably the most efficient, with O(n log n) time, but is also more complex to understand.

    It may also simply be random points connected by random lines. It's hard to tell.