POV-Ray : Newsgroups : povray.general : Math Help Request - Parabola Server Time
31 Oct 2024 23:28:39 EDT (-0400)
  Math Help Request - Parabola (Message 1 to 8 of 8)  
From: Tim McMurdo
Subject: Math Help Request - Parabola
Date: 23 Feb 2005 09:45:00
Message: <web.421c963e4bfc3507acb32c570@news.povray.org>
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

From: scott
Subject: Re: Math Help Request - Parabola
Date: 23 Feb 2005 09:59:18
Message: <421c9a46@news.povray.org>
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

From: Stefano Tessarin
Subject: Re: Math Help Request - Parabola
Date: 23 Feb 2005 10:05:42
Message: <421c9bc6$1@news.povray.org>
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

From: Peter Duthie
Subject: Re: Math Help Request - Parabola
Date: 23 Feb 2005 20:52:04
Message: <421d3344$1@news.povray.org>
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

From: Slime
Subject: Re: Math Help Request - Parabola
Date: 24 Feb 2005 01:19:14
Message: <421d71e2$1@news.povray.org>
> 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

From: Alf Peake
Subject: Re: Math Help Request - Parabola
Date: 24 Feb 2005 07:15:15
Message: <421dc553$1@news.povray.org>
"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

From: Tim McMurdo
Subject: Re: Math Help Request - Parabola
Date: 24 Feb 2005 07:45:00
Message: <web.421dcb97b8f020716e93bf990@news.povray.org>
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

From: Peter Duthie
Subject: Re: Math Help Request - Parabola
Date: 28 Feb 2005 17:30:20
Message: <42239b7c$1@news.povray.org>
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

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