This week I was supposed to create classes and instantiate objects. Last week I tinkered with a random line drawing program. The way it works is simple:
1. pick a starting point
2. pick a point on an invisible circle
3. draw a line between points
3. the second point becomes the new starting point
I tried to limit the points on the circle so it was more like picking a point on the crust of a slice of pizza. I was attempting to make the movement smoother. What I got looked like a long tent pole that was unhinged and thrown onto the screen.
This was because I was using the random() function to pick a value. I switched to the noise() function and the result was much more fluid and ultimately cooler looking.
Clicking on the window resets the points to the mouse location.