The robot's path would start at the green, and draw the blue line. The orange represents where the robot would move without drawing anything. Robot would then proceed to draw the blue line, finaly ending at the red dot.
The equation for the Bezier curves are:
I had to create a set of loops that calculate the points on the curve for different points in time.
It is important to notice that the middle control points never fall on the curve, if you are not careful, instead of drawing a circle you wil draw a rectangle. The opposite is also true if you draw a curve instead of a line.
With everything seemingly working well, it was time to try out the algorithm on a more complex design, the logo from my new alma mater.
[Update 10/13/2018] I am currently in the process of testing the robot on a small scale. I have the path and a program that controls the stepper motors using Raspberry Pi. The partial code is below. Essentially, each curve creates an independent loop where the raspberry pi calculates its position and the position where it needs to be. Using this information, it tells each motor to move a number of steps until it it at the desired position. And the loop repeats until each curve is drawn. I will post the results when complete.