POV-Ray : Newsgroups : povray.advanced-users : Optimized curves : Re: Optimized curves Server Time
2 Nov 2024 09:20:04 EDT (-0400)
  Re: Optimized curves  
From: Bjoern Jaeger
Date: 22 Dec 1999 18:53:56
Message: <38616494@news.povray.org>
Hi

>I need the spheres to be positioned so that there's a specified distance
>between them and so that the bending is also evenly distributed.

I had the same problem when I made the tracks for my LEGO-excavator. To
distribute the tracklinks I wrote some macros.
The first macro worked much like a spline-function. It took a "time" value
0<=t<1 and returned a position along the desired path. My function didn't
use splines but consisted of several segments (straights and
circle-segments).
Another macro was used to get positions along the path with the desired
distances. It took a timevalue (which defined the old position) and the
desired distance to estimate the new timevalue with a certain precision.
This was done by a kind of binary search.
The last macro was just a loop that positioned the links by calling the
second macro repeatedly.

I don't know if this description was of much help. My solution is cetainly
quite parse-time-consuming :)

Good luck

                  Bjoern


Post a reply to this message

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