Draw some cool spirals!
With Spyral you can draw cool and mesmerizing spirals!
Note: this is a work in progress, done quickly. There is plenty of room for improvement. So feel free to make some changes and improve this project :)
-
Make convex polygons:
- Generate N random points (seeds)
- Get the Voronoi diagram from the seeds (see scipy)
- Get a set of vertices and regions (linked vertices) from the Voronoi diagram
-
Draw spirals inside each polygon (region) generated:
Do the follwing until a stop condition is true:
- Draw a line from one polygon's vertex to another.
- Move the vertex along the edge so that it is closer to the next vertex.
- Move to next vertex.
Generate a 1500*500 banner:
raw_image(width=1500, height=500)
Generate a 1500*500 black and white banner:
raw_image(width=1500, height=500, color=(0, 0, 0)

