POV-Ray : Newsgroups : povray.general : evenly spaced points on splines : Re: evenly spaced points on splines Server Time
31 Jul 2024 04:21:11 EDT (-0400)
  Re: evenly spaced points on splines  
From: Nicolas George
Date: 17 Apr 2008 13:27:54
Message: <4807889a@news.povray.org>
"Tim Attwood"  wrote in message <480711b5$1@news.povray.org>:
> I've read through a book on topology a while back and it
> seemed very dense to me, isn't a derivative vector a
> derivative in respect to a vector field? A vector field
> being a mapping from R^n to R^n?

I think you are confusing some notions. If you have something from R^n to
R^p. First, on the image, R^p is just a bunch of of R put together, and any
sort derivation will act independently on each component. Therefore we can
assume that p = 1.

If you have R^n -> R, you can speak of partial derivatives, or more
generally of the derivative in a particular direction; or you can speak of
differential forms, which puts everything together. The differential form is
the thingie that gives you the derivative in a particular direction knowing
the direction; the partial derivatives are the values of the differential
form for the base vectors.

<troll>
Curl, divergence and similar operators are just properties of the
differential form defined by physicists and engineers who do not understand
differential forms.
</troll>

But all this is somewhat advanced calculus. In France at least, it is only
taught to science students in college or similar level.

But in the n = 1 case, everything is much simpler: there is only one partial
derivative, which is thus no longer partial. The derivative of a function is
just the slope of the tangent to the curve. And if the function represents
the position of a point on an axis, then the derivative is the speed of the
point.

(For the record, still in France, this is taught to high school in
penultimate year to most students.)

If you have several dimensions for the image, as I said, each dimension
operates independently. That gives you the coordinates of a vector, called
the derivative vector.

If you see your function as a parametric arc, then the derivative vector is
a direction vector of the tangent to the arc (except at singular points, of
course).

If your function is the trajectory of an object, then the derivative vector
is its speed.


Now, for any sane definition, the length of a smooth curve given as a
parametric arc is the integral of the length of the derivative vector.

To approximate the length of a curve, you can approximate it by a polygonal
line, and compute the length of that line. That was the proposed solution.

But if you happen to know the exact derivative vector at any point, then I
suspect that using it instead will be more accurate.

>				      Remember that
> we don't know the type of spline here either. 

The term spline commonly refers to piecewise polynomial curves, and
especially with degree 3 (which allow to 4 control points: the start, the
end, and the derivative vectors for both).

The derivative of a polynomial is pretty easy to compute.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.