Gererating curves turned out to be more difficult than just lines. When using polar coordinates to draw circles you need corresponding x and y values for each angle you’re drawing, and randomness has to be added to these two coordinates. Using polar coordinates, the images below show the first version of a generative pencil curve.
On the right side of each circle the end of the line is much wider than the beginning. This results from the addition of the random walks. The same phenomenon can already be seen when looking at the straight lines above and has been mentioned earlier. To fix this issue, we need some transformations first.
Using the vertical distance dy between the endpoint and the starting point the needed rotation angle phi_rot is determined:
phi_rot = sin(dy/width)
By rotating the whole line, the random walk instance in question, by minus one times phi_rot we get aligned endpoints.