Imported modules
|
|
import math
|
Functions
|
|
arc_lengths
cubic_segment_points
linear_segment_points
overhauser_spline_points
quadratic_segment_points
|
|
arc_lengths
|
arc_lengths ( points )
Return a list of arc lengths for a piecewise linear curve specified by
points. The points should be objects with operator - defined such as
Numeric Python arrays. There number of arc lengths returned equals the
number of points, the first arc length being 0.
|
|
cubic_segment_points
|
cubic_segment_points (
p1,
t1,
p2,
t2,
subdivisions,
)
Return a sequence of points along a cubic starting at p1 with tangent t1
and ending at p2 with tangent t2.
|
|
linear_segment_points
|
linear_segment_points (
p1,
p2,
subdivisions,
)
Return a sequence of points along a linear segment starting at p1 and ending
at p2.
|
|
overhauser_spline_points
|
overhauser_spline_points ( points, segment_subdivisions )
Return cubically interpolated point list. An Overhauser spline
(aka Catmul-Rom spline) uses cubic segments that join at the given points
and have continuous tangent vector. The tangent vector at point i equals
the difference vector between points i+1 and i-1.
For the end segments I use a quadratic curve.
It is assumed that the points are objects with operators +, -,
and * (by float) defined. For example, Numeric Python arrays work.
But points that are lists or tuples will not work.
|
|
quadratic_segment_points
|
quadratic_segment_points (
p1,
t1,
p2,
subdivisions,
)
Return a sequence of points along a quadratic starting at p1 with tangent t1
and ending at p2.
|
|