Use splitCubicIntoTwo() more
Shaves another 5%.
This commit is contained in:
parent
dff2cd8669
commit
8a13ef1edf
@ -163,6 +163,9 @@ def cubic_approx_spline(p, n, tolerance):
|
||||
return quad
|
||||
|
||||
spline = [p[0]]
|
||||
if n == 2:
|
||||
segments = splitCubicIntoTwo(p[0], p[1], p[2], p[3])
|
||||
else:
|
||||
ts = [i / n for i in range(1, n)]
|
||||
segments = splitCubicAtT(p[0], p[1], p[2], p[3], *ts)
|
||||
for i in range(len(segments)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user