|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|