|
![](/i/fill.gif) |
Hi Ricky,
thanks for the explanation.
I want to place a number of cuboids along a spline path, and rotate them
according to the twisting of the path.
I'll need the tangent as one of the cuboid's axes, but I also need the direction
of curvature to know how the cuboid is to be rotated around the tangent axis.
That's the background.
I've been thinking :-)
Finding the tangent axis is easy: that's r(t+1) - r(t-1), translated to r(t),
right?
Now, as long as r(t-1), r(t) and r(t+1) are not collinear, they define a circle
whose center (c) is the center of curvature in r(t), right? So my normal vector
is r(t) - c(t).
Two points of attention:
1. r(t-1), r(t) and r(t+1) are collinear. In that case I would move c with r,
i.e. c(t) = c(t-1) + r(t) - r(t-1).
2. if the three points are nearly collinear the problem may be ill-conditioned.
I guess I could treat them as collinear if the radius of curvature becomes very
large.
So, what do you think?
As for your OpenGL demo, I have no experience, but I'm interested. Is there a
way on this forum to send you my e-mail address privately?
Again thanks.
Steven
Post a reply to this message
|
![](/i/fill.gif) |