|
![](/i/fill.gif) |
Tim McMurdo wrote:
> I need to know how to equally space objects on a curve formed by a
> parabola. The vertex will be at the origin, so that should simplify
> matters (I believe this means that the formula for the curve itself
> will be a simple aX^2).
>
> What I am going to use this for is to place spheres along a parabola
> to create rope. I would use a cantenary but I want to be able to
> reflect the stiffness of the rope. I figure a parabola is the way to
> go as I can adjust the fatness of the curve using a. At a given point
> (X,Y), the curve will be nearly vertical.
>
> My problem is figuring out how to evenly space the spheres along the
> curve.
>
> Any takers?
Well there may be a better way of doing it, but my first thought was to do
it this way:
Assume you've just placed a sphere at (X,Y) (X=0,Y=0 to start)
Then, the slope the rope will be going at will be dy/dx = 2ax.
SO use this slope to work out the x-increment to get to the next sphere.
Assume you want to move a distance "d" along the rope. Then the x-increment
to the next spehere will be d.cos(theta) where theta is the angle that
corresponds to dy/dx.
So I guess something like this:
X=0
loop
{
Y=aX^2
place sphere at X,Y
X = X + d * cos( atan(dy/dx) )
}
I haven't tried it, but it would be the line of attack I would take.
BTW the catenary models the behaviour of a rope more accurately than a
parabola, neither take into account any stiffness, the catenary is the
physically correct shape for a rope with no stifness. The parabola is
nothing really.
Post a reply to this message
|
![](/i/fill.gif) |