File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -225,13 +225,12 @@ class BezierSegment:
225
225
"""
226
226
227
227
def __init__ (self , control_points ):
228
- self .cpoints = np .asarray (control_points )
229
- self .n , self .d = self .cpoints .shape
230
- self ._orders = np .arange (self .n )
231
- coeff = [math .factorial (self .n - 1 )
232
- // (math .factorial (i ) * math .factorial (self .n - 1 - i ))
233
- for i in range (self .n )]
234
- self ._px = self .cpoints .T * coeff
228
+ n = len (control_points )
229
+ self ._orders = np .arange (n )
230
+ coeff = [math .factorial (n - 1 )
231
+ // (math .factorial (i ) * math .factorial (n - 1 - i ))
232
+ for i in range (n )]
233
+ self ._px = np .asarray (control_points ).T * coeff
235
234
236
235
def point_at_t (self , t ):
237
236
"""Return the point on the Bezier curve for parameter *t*."""
You can’t perform that action at this time.
0 commit comments