@@ -986,22 +986,20 @@ def arc(cls, theta1, theta2, n=None, is_wedge=False, wrap=True):
986
986
987
987
Notes
988
988
-----
989
- The arc is approximated using cubic Bézier curves, as described in
990
- Masionobe, L. 2003. `Drawing an elliptical arc using polylines,
991
- quadratic or cubic Bezier curves
992
- <https://web.archive.org/web/20190318044212/http://www.spaceroots.org/documents/ellipse/index.html>`_.
989
+ The arc is approximated using cubic Bézier curves, as described in
990
+ Masionobe, L. 2003. `Drawing an elliptical arc using polylines,
991
+ quadratic or cubic Bezier curves
992
+ <https://web.archive.org/web/20190318044212/http://www.spaceroots.org/documents/ellipse/index.html>`_.
993
993
"""
994
994
995
995
eta1 = theta1
996
996
if wrap :
997
997
# Wrap theta2 to 0-360 degrees from theta1.
998
998
eta2 = np .mod (theta2 - theta1 , 360.0 ) + theta1
999
- print ('Eta1, Eta20' , eta1 , eta2 )
1000
999
# Ensure 360-deg range is not flattened to 0 due to floating-point
1001
1000
# errors, but don't try to expand existing 0 range.
1002
1001
if theta2 != theta1 and eta2 <= eta1 :
1003
1002
eta2 += 360
1004
- print ('Eta1, Eta2' , eta1 , eta2 )
1005
1003
else :
1006
1004
eta2 = theta2
1007
1005
eta1 , eta2 = np .deg2rad ([eta1 , eta2 ])
@@ -1012,9 +1010,8 @@ def arc(cls, theta1, theta2, n=None, is_wedge=False, wrap=True):
1012
1010
# this doesn't need to grow exponentially, but we have left
1013
1011
# this way for back compatibility
1014
1012
n = int (2 ** np .ceil (2 * np .abs (eta2 - eta1 ) / np .pi ))
1015
- print ('Here' )
1016
1013
else :
1017
- # this will not grow exponentially if we allow wrapping arcs:
1014
+ # this will grow linearly if we allow wrapping arcs:
1018
1015
n = int (2 * np .ceil (2 * np .abs (eta2 - eta1 ) / np .pi ))
1019
1016
if n < 1 :
1020
1017
raise ValueError ("n must be >= 1 or None" )
0 commit comments