Handbook
Glossary
<kochanek-bartels-curve> ( points m0 mn tension bias continuity -- polynomials-sequence )
Vocabulary
math
.
splines
Inputs
points
points on the spline
m0
start tangent
mn
end tangent
tension
a
number
bias
a
number
continuity
a
number
Outputs
polynomials-sequence
sequence of sequence of polynomials
Word description
Creates a sequence of cubic hermite curves (each a sequence of polynomials) passing through the given points, generating tangents with the given tuning parameters.
Definition
USING:
arrays
kernel
math.splines.private
sequences
;
IN:
math.splines
::
<kochanek-bartels-curve>
( points m0 mn tension bias continuity -- polynomials-sequence )
tension bias continuity
kochanek-bartels-coefficients
:>
( s1 d1 s2 d2 ) points m0 mn
[
s1 s2
kochanek-bartels-tangents
]
[
d1 d2
kochanek-bartels-tangents
]
3bi
:>
( in out ) points in out
[
3array
]
3map
(cubic-hermite-spline)
;