Re: Cubic spline path (was: rotation in 3D)



On Fri, 11 Apr 2008 06:17:20 +0200, Steven wrote:
[After I wrote, re Ioannis's comments:]
A search like you propose amounts to the same thing Steven proposed,
calculating a huge number of points, namely 10000 spline evaluations
over the [0,1] interval when placing a handful of points in the
interval. It would be more reasonable to use a bisection search (see
eg http://en.wikipedia.org/wiki/Bisection_method ) which will take
fewer than 100 spline evaluations to place 6 points at .0001 accuracy.

First reaction: why didn't I think of that? But I think I need a line
integral here. POV-ray's spline function returns points on the curve,
and the only thing I know is that the function is monotoneous, i.e. that
.................................................... monotonic
if x is in [a,b] then the point Px will lie between Pa and Pb on the
curve.
There's no guarantee that, for x=(a+b)/2, the line integral over [a,x]
will be the same as the l.i. over [x,b]. Indeed most of the times it
won't be. Thanks anyway,

So, if I understand correctly now (earlier I didn't!) and using Ioannis's
notation, you have s(t) which as t goes from 0 to 1 moves along a space
curve monotonically but not necessarily proportionally with respect to t
versus length, and you are looking for points at particular lengths along
the curve. Perhaps you can re-characterize your splines as described in the
papers http://www.cs.uiowa.edu/~kearney/pubs/CurvesAndSurfacesArcLength.pdf
and http://www.saccade.com/writing/graphics/RE-PARAM.PDF about "Arc-Length
Parameterized Spline Curves", but if not consider following. Let L(t)
stand for the curve length from s(0) to s(t). In the bisection search
you would evaluate L(t) rather than s(t). Computing L(t) may take a dozen
or so s(r) evaluations for r between s and t, where s is the left bound of
the current bisection interval and L(s) is accurately computed by numerical
integration in previous bisection steps. That is, the interval over which
numerical integration is done can be kept quite short, holding down the
number of s evaluations needed while still keeping L(t) monotonic.

-jiw
.



Relevant Pages

  • Re: Confusion about splitting classes to allow sharing of resources
    ... > selecting algorithms is a good job for patterns like Strategy. ... Spline classes, such as LinearSpline and CubicSpline, based on the same ... The higher-level class Curve should be able to select ... >> interpolation data gets regenerated. ...
    (comp.object)
  • Re: Revolve 3D curve?
    ... Hardly surprising, for the "2 sketch" sweep, that it conforms exactly. ... spline, being the starting profile for the sweep, forms a boundary of the ... I would expect that divergence would not be ... > the 3D curve. ...
    (comp.cad.solidworks)
  • Re: Confusion about splitting classes to allow sharing of resources
    ... I have a working Spline ... >> Along with the splines for x and y, the Curve class also has one ... >> Adding new interpolation variables in subclasses of Curve will then ... instantiate the relevant Nodes and add them to the R5 ...
    (comp.object)
  • Re: B-spline sampling?
    ... To sample the spline, and that works well. ... neighboring spheres, so they look like pearls on a string. ... My curve is the type, where you have a knot and a mirroed tangent vector ... if you have an arclength parameterization ...
    (comp.graphics.algorithms)
  • Importing parametric splines from Mathcad (or Excel book) to SW
    ... work is done by simulation and analysis in MathCad v13. ... surfaces, transducer, dynamic stresses, all ... How do I get a parametric curve on my data points into SW. ... It works very well to generate parametric spline ...
    (comp.cad.solidworks)