|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
Tim
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
well catenary it's your solution since the lenght of a curve given the
equation y=a*cosh(x/a) is simlply s=a*sinh(x/a) so you can easily
describe what you want.
--
Best regards,
Stefano Tessarin
To follow the path:
look to the master,
follow the master,
walk with the master,
see through the master,
become the master.
Zen poem.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Although it's not completely relevant to your parabola question, I used
a caternary to model hanging cables in my povcomp image and it seemed to
work out pretty well. The source code is linked to from the viewing
page, feel free to use it in any way without restriction if you like.
Although I didn't use spheres, I used cylinders with spheres at joints
due to the sheer number of cables simulated, with a simple algorithm
that increases the number of cylinders in each cable depending on the
distance to the viewer. I also tried sphere sweeps based on splines
generated from points along the cable, but got some weird artifacts I
couldn't figure out. The biggest problem was figuring out how to hang a
rope between two arbitrary points that hung down with a specific amount
of slack, as well as trying to recall decade old math lessons :)
http://www.povcomp.com/entries/181.php
If you have any questions, ask away.
Regards,
Peter D.
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?
>
> Tim
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> http://www.povcomp.com/entries/181.php
I liked that image, by the way. I think it might have done better with more
detail in the buildings and terrain, and more exciting colors. But the
transport tube thing is cool, especially from the angle you chose.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tim McMurdo" wrote:
> What I am going to use this for is to place spheres along a parabola
> to create rope.
I've seen 2 or 3 rope macros over the last few years but this is the
only reference I can find on my HD -
<quote>
From: R Suzuki
Subject: Rope Macro
Date: 22 Jan 2002 09:49:44
Message: <3c4d35b8@news.povray.org>
</quote>
And this is on this server somewhere
<quote>
// File: rope.inc
// Ver.: 0.5
// Desc: Macros for ropes and twisted wires
// Date: 01/21/2002
// Auth: Ryoichi Suzuki <r-suzuki.aist.go.jp>
</quote>
I think John VanSickle(sp?) had a utility for hanging rope between any
2 points. I remember using it for the threads on a spider's web.
HTH
Alf
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks everybody for your help on this. I appreciate the effort you put into
it. I will update you on the results.
Tim
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks Slime. I realised that the buildings were a weak point in my
image when I showed it to a friend before submitting it, and he said
"It's very nice, but what are those things?" "Uh, buildings."
"Oh....". I know I would have done better using brighter more vivid
colours, but that would have compromised they whole decay theme, and I'm
more in to the dark, moody themes personally (even though they'll never
win an art competition!) I was mostly pleased with the fact that the
whole thing is SDL macro driven from the ground up. Any aspect of the
image should be tunable by a little judicious parameter tweaking.
Peter D.
Slime wrote:
>>http://www.povcomp.com/entries/181.php
>
>
> I liked that image, by the way. I think it might have done better with more
> detail in the buildings and terrain, and more exciting colors. But the
> transport tube thing is cool, especially from the angle you chose.
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |