Polar Flower
This sketch generates random points in a polar coordinate system to produce a flower-like pattern, operating much like a three-dimensional Spirograph.
It starts by generating random increments for the , , and coordinates. A random range, , is generated for the coordinate, while and operate within the fixed range .
The first point always starts at . The increments are then applied to each coordinate to generate the next point. The coordinate oscillates between and , while the and coordinates wrap around when they reach the limits of their range.
The resulting points are converted to space and rendered to the screen.
You can use the mouse to rotate around the axes and the mouse wheel to zoom. The following key controls are also available:
- D turn on debug mode and display the axes
- X toggle rotation on the x-axis
- Y toggle rotation on the y-axis
- Z toggle rotation on the z-axis
- Any other key start a new flower