DEV Community

Discussion on: I have the weekend free | Suggest weird ideas and I'll try to code them!!!

Collapse
 
jakerich1 profile image
Jake Riches

How about writing a script that creates a Voronoi diagram in a canvas element

Collapse
 
nombrekeff profile image
Keff

Nice suggestion!! I've done this one before though! Quite the nice project, I enjoyed the challenge!

Collapse
 
nombrekeff profile image
Keff

Well, I ended up doing it again xD Experimenting with different algorithms and distance funcitions. Playing with the distance function results in some interesting pattters. Check this one out, it's the voronoi diagram algorithm but changing the distance function to do some weird calculations. If you change the distance function back to manhatan or euclidean distance its rendered as you would expect.

Image description