POV-Ray : Newsgroups : povray.animations : Mathematician needed Server Time
17 May 2024 06:58:43 EDT (-0400)
  Mathematician needed (Message 1 to 5 of 5)  
From: Bob Frew
Subject: Mathematician needed
Date: 6 Oct 2006 12:45:31
Message: <4526882b$1@news.povray.org>
Help needed please
I am trying to calculate a set of regular distance points along the path of 
a conical spiral helix.
I need these to ultimately run a smooth camera around the scene I'm working 
on.

So if you have a general spiral helix  where
 R is the large radius
 r is the small radius
 H is the height
 n is the number of turns of the spiral

Anyone know
       a) How long is the total spiral ?
       b) How to calculate (x,y,z) for a given distance along the spiral 
(not angle) ?

If this is one of those blindingly obvious things, I'll apologise now.

Thanks Bob


Post a reply to this message

From: MSAB
Subject: Re: Mathematician needed
Date: 7 Oct 2006 00:40:01
Message: <web.45272f6221f6831cd37f8e50@news.povray.org>
"Bob Frew" <bob### [at] ntlworldcom> wrote:
> Help needed please
> I am trying to calculate a set of regular distance points along the path of
> a conical spiral helix.
> I need these to ultimately run a smooth camera around the scene I'm working
> on.
>
> So if you have a general spiral helix  where
>  R is the large radius
>  r is the small radius
>  H is the height
>  n is the number of turns of the spiral
>
> Anyone know
>        a) How long is the total spiral ?
>        b) How to calculate (x,y,z) for a given distance along the spiral
> (not angle) ?
>
> If this is one of those blindingly obvious things, I'll apologise now.
>
> Thanks Bob
to a) isnt't it (2*pi*((R-r)*2+r))*n+H ?


Post a reply to this message

From: Roman Reiner
Subject: Re: Mathematician needed
Date: 8 Oct 2006 05:50:01
Message: <web.4528c8e021f68317271c1170@news.povray.org>
Hi Bob,

This is is far from blindingly obvious! I hope i didn't make a mistake
though...

the parameterized path function should be:

f(t)=[x(t),y(t),z(t)]=[H*t,(r+(R-r)*t)*sin(2*pi*n*t),(r+(R-r)*t)*cos(2*pi*n*t)]

where t goes from 0 (bottom y=0, r) to 1 (top y=H, R).

if you continue from here the results are getting pretty ugly (tbh i'm
surprised they are getting *that* ugly) but anyway: the total length of the
path is:

a) L = (H^2 + (r - R)^2)*LN((sqrt(H^2 + (2*pi*n*r)^2 + (r - R)^2) -
2*pi*n*r)/(sqrt(H^2 + (2*pi*n*R)^2 + (r - R)^2) - 2*pi*n*R))/(4*pi*n*(R -
r)) + r*sqrt(H^2 + (2*pi*n*r)^2 + (r - R)^2)/(2*(r - R)) + R*sqrt(H^2 +
(2*pi*n*R)^2 + (r - R)^2)/(2*(R - r))

where x^2 is pow(x,2) (and no i didn't calculate this by hand ;-))

I couldn't solve b) and i doubt it would be any nicer than a)

Does this help? :-)

Regards Roman


Post a reply to this message

From: Bob Frew
Subject: Re: Mathematician needed
Date: 11 Oct 2006 07:38:04
Message: <452cd79c@news.povray.org>
Many thanks for replies and for taking the time out.
It is unfortuanately going to be a while before I can get back to this 
project.
Certainly have more to think about now though.
Your comment Roman expressed what I felt about it. As the cone is a 
fundamental shape you would think the formula would be some simple (short) 
equation.
I have that sinking feeling that calculus is involved here. I have forgotten 
what little I ever learned of that. (a very long time ago).
Ho hum more "light" reading to do.

Thanks again Bob

"Roman Reiner" <lim### [at] gmxde> wrote in message 
news:web.4528c8e021f68317271c1170@news.povray.org...
> Hi Bob,
>
> This is is far from blindingly obvious! I hope i didn't make a mistake
> though...
>
> the parameterized path function should be:
>
> f(t)=[x(t),y(t),z(t)]=[H*t,(r+(R-r)*t)*sin(2*pi*n*t),(r+(R-r)*t)*cos(2*pi*n*t)]
>
> where t goes from 0 (bottom y=0, r) to 1 (top y=H, R).
>
> if you continue from here the results are getting pretty ugly (tbh i'm
> surprised they are getting *that* ugly) but anyway: the total length of 
> the
> path is:
>
> a) L = (H^2 + (r - R)^2)*LN((sqrt(H^2 + (2*pi*n*r)^2 + (r - R)^2) -
> 2*pi*n*r)/(sqrt(H^2 + (2*pi*n*R)^2 + (r - R)^2) - 2*pi*n*R))/(4*pi*n*(R -
> r)) + r*sqrt(H^2 + (2*pi*n*r)^2 + (r - R)^2)/(2*(r - R)) + R*sqrt(H^2 +
> (2*pi*n*R)^2 + (r - R)^2)/(2*(R - r))
>
> where x^2 is pow(x,2) (and no i didn't calculate this by hand ;-))
>
> I couldn't solve b) and i doubt it would be any nicer than a)
>
> Does this help? :-)
>
> Regards Roman
>
>
>


Post a reply to this message

From: scott
Subject: Re: Mathematician needed
Date: 23 Oct 2006 05:48:13
Message: <453c8fdd$1@news.povray.org>
Bob Frew wrote:
> Many thanks for replies and for taking the time out.
> It is unfortuanately going to be a while before I can get back to this
> project.
> Certainly have more to think about now though.
> Your comment Roman expressed what I felt about it. As the cone is a
> fundamental shape you would think the formula would be some simple
> (short) equation.
> I have that sinking feeling that calculus is involved here. I have
> forgotten what little I ever learned of that. (a very long time ago).
> Ho hum more "light" reading to do.

Why not just do it numerically?  Take Roman's parametric equation for the 
point at time t, calculate the points and many small intervals.  Then you 
can work out the distance between each point, and of course the total 
distance.  Then if you want, say, 10 points spaced equally, step through the 
calculated points until the cumulative distance is above n/10 of the total 
distance.  It will take longer to parse, but surely quicker to code :-)

Something like this could work (psuedo-code):

n=1
for t=0 to 1 step 0.001
 point[n] = 
[x(t),y(t),z(t)]=[H*t,(r+(R-r)*t)*sin(2*pi*n*t),(r+(R-r)*t)*cos(2*pi*n*t)]
 distance[n] = distance[n-1] + vlength( point[n] - point[n-1] )
 n++
next

totalDistance = distance[1000]

for n=1 to 1000
 for p=1 to 10
  if distance[n]<totalDistance*p/10 then camPoint[p] = point[n]
 next p
next


Post a reply to this message

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