diff --git a/chris_ellipse_exploration/ellipse.py b/chris_ellipse_exploration/ellipse.py index 4f8d6e9..c18585c 100644 --- a/chris_ellipse_exploration/ellipse.py +++ b/chris_ellipse_exploration/ellipse.py @@ -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()