|
|
Among other things, Dave Matthews saw fit to write:
>> I have done this for the latter instalment of my knot project. My
>> algorithm is slow (parse time > render time) but seems to do the trick.
>> It entails slowly moving along the path with very small increments in
>> time, and numerically integrating the distance travelled using repeated
>> vlength() calls. When the cumulative distance reaches a threshold, place
>> an object (in my case, a ring of bricks or a stair), reset the cumulative
>> distance counter and keep going.
>
> That's exactly the approach I've been working on. If it's slow, that's
> ok, after all, we're not being charged by the hour ;-)
I found a paper somewhere (in the internet) about re-parametrizing splines.
It came to say that, if you get a set of equidistant points along a spline,
you can use these points as nodes of a new spline that will: a) follow the
original spline closely, and b) have constant "arc-length speed". I could
try to find this paper again, but if anyone wants to try, it talked about
road design for simulations or something like that.
For a very different subject, unrelated to POV-Ray, I'm also trying to find
points at a given distance along a spline, but I do that with a standard
programming language, having the explicit parametric equations of all
segments of the spline. I perform the integrations with a Gaussian
quadrature and find the target points with the secant method.
--
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
Post a reply to this message
|
|