[ODE] An embarassingly basic geometry question

Nate W coding at natew.com
Wed Jun 11 11:48:02 2003


On Wed, 11 Jun 2003, Shamyl Zakariya wrote:

> 	-calculate normal to this triangle, using vectors ba and bc, this is 
> the axis the cylinder will be rotated on
>
> For what it's worth, the piston starts misaligning when the calculated 
> angle goes past PI/2.

Your reasoning looks right to be, but if there's a problem, I'd be looking
at the 'calculate normal' step.  There are to normals to that triangle
(think 'top' and 'bottom') and I'm not sure which you'll end up with.  
Does the axis change sign unexpectedly?  Or, what happens if you change
the sign of the rotation angle?  Or change it when the angle goes past
PI/2?

This is of course the blind leading the blind.  "Tweak this and see what
happens" is probably not the best way to debug this sort of thing. :-)

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com