I had to open my algebra textbooks to review my engineering notes to paint curves. SOH CAH TOA is written throughout my notebook to remind myself of the sine and cosine calculations. Thankfully it came back to me quickly.
The two paintings below are VERY different, despite both using curves: one uses the equation of a circle based on center and radius of the circle. The other uses an x,y point along the curve, length and a direction to create two points (a chord)… then finds a 3rd point midway based on another angle…. THEN finally calculates the curve. The second version was worth the extra calculations as it allows me to have more flexibility in painting creation as I develop the code.
Prior to this I have been painting straight lines based on two randomly selected points. What has been interesting now that I am painting curves, is how different the paint and brush behave when drawing a straight line versus a curve. A perfectly straight line does not jostle the bristles very much during the paint application so less paint is deposited on the paper. The brush stroke is thinner and stiff – dare I say it looks very “robotic”. While the curve has much more character as the bristles move the paint between the bristles is released onto the paper..
Personally, when I hold a brush in my hand, I tend to twirl a brush while I paint, so it makes sense that I am getting more paint on the surface when I paint a curve versus a straight line. In the long term I will add a twirling head to the robot… but for now I’ll have some fun with this code.