De Boor's algorithm: Difference between revisions

Content deleted Content added
No edit summary
Line 62:
 
<source lang="python">
def deBoor(k: int, x: int, t, c, p: int):
"""Evaluates S(x).
Evaluates S(x).
 
ArgsArguments
---------
k: indexIndex of knot interval that contains x.
x: positionPosition.
t: arrayArray of knot positions, needs to be padded as described above.
c: arrayArray of control points.
p: degreeDegree of B-spline.
"""
d = [c[j + k - p] for j in range(0, p+1)]