|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |