|
|
Sigmund Kyrre Aas <as### [at] studntnuno> wrote:
> I agree if you mean:
> integral of sqrt(X'(t)^2 + Y'(t)^2 + Z'(t)^2) from 0 to t1 equals l/n.
>
> .. and the next would be from t1 to t2 right?
> But I can't solve this equation analytically.
>
> As I see it I can
> a) produce splines in pov using LSpline3
> b) produce splines in Matlab
> c) solve the 13 equations above numerically in Matlab
>
> -- think I'll start with a) even though I'm a spline virgin.
I had the same problem when creating my own Spline macro system: it creates
multi-segment cubic interpolating splines, and there is no known way of
integrating the spline function. My solution, both for calculating the
length of the spline and finding evenly spaced intervals along it, was to
first sample the spline segment's length (L) at equal values of the control
parameter (t), and then reverse interpolate to get equal length intervals.
I've optimised the macros to precalculate all possible coefficients from the
original point data, and I've added a cache-file feature, so the performance
is (to me, at least) quite acceptable. If you would like a preview copy
feel free to email me for details.
Post a reply to this message
|
|