We are about to switch to a new forum software. Until then we have removed the registration on this forum.
https://www.marginallyclever.com/2016/06/creating-processing-arc-method/
https://github.com/i-make-robots/drawArcs
Designed to closely resemble the gcode G02 an G03 commands. The above sketch includes visualization routines.
void drawArc(float sx,float sy,float ex,float ey,float cx,float cy,boolean cw)
arc starts at (sx,sy) arc ends at (ex,ey) arc center is at (cx,cy) arc direction around center is clockwise if cw=true
start-center does not have to be the same distance as end-center, so sections of ellipses are easy to draw.
I hope you find this useful. Enjoy!
Comments
Does the job, well done.
My only other comment is that if the start-center distance is different from the end-center distance then you are drawing a spiral section not an elliptical section.