ADjust ellipse starting angle

This commit is contained in:
Chris Proctor 2025-06-26 13:00:31 -04:00
parent c027ffbf9f
commit 02902dac51
1 changed files with 3 additions and 2 deletions

View File

@ -12,15 +12,16 @@ def ellipse(rx, ry, num_points, points_to_draw=None):
the +x direction, and ends in the same position and heading.
"""
radians()
φstart = get_angle(rx, ry, num_points, 0) / 2
fly(rx)
left(π/2)
left(π/2 - φstart)
for i in range(points_to_draw or num_points):
φi = get_angle(rx, ry, num_points, i)
di = get_distance(rx, ry, num_points, i)
print(i, φi, di)
left(φi)
forward(di)
left(-π/2)
left(-π/2 + φstart)
fly(-rx)
degrees()