Drawing an ellipse (move/turn loop)
228
Publicado 2021-05-24
I'm pretty sure the shape is a correct ellipse, though there will be some inaccuracy due to the limited number of steps taken (360).
I have a similar project with a much simpler formula, but that one does not draw a mathematically correct ellipse.
https://scratch.mit.edu/projects/532445590/
I got the idea for this project after receiving an invitation for @s_federici's studio "Simplest ellipse drawing algorithm":
https://scratch.mit.edu/studios/29609673/
The background image was created using mathcha.io.
I found the formula as follows:
(1) given tangent's angle t, y = b*sin(arctan(b/a*tan(t))
(2) taking steps dt, y = integral of f(t)*cos(t)*dt
(3) solve equality between derivative y' of (1) and (2)