Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perpendicular and Parallel



Can you look to previous velocity for a clue to direction?

You might consider using a default direction algorithm based upon position or other vertex/particle attributes?


David Farmer email@hidden

On May 30, 2007, at 8:12 AM, Lorenzo wrote:

Hi,
I have to find the vector "pv" perpendicular to an arbitrary vector "tv".
The perpendicular vector "pv" has to be parallel to the XZ (floor) plane.
How to do it?


I have successfully found a generic perpendicular with the cross product
between tv and a random vector rv. Of course the result is a vector not
always laying on the XZ plane so pv[1] != 0.
So I have found this trick. Firstly I set rv = tv. Then I set rv[1] = 0 or
rv[1] += 12345; So tv and pv lay on the same vertical plane.
So I find pv[1], that is pv is parallel to the plane XZ. Good.
The problem is that this trick doesn't work for any tv. E.g. when tv is
{0, 1, 0} it doesn't work.



Best Regards -- Lorenzo email: email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >Perpendicular and Parallel (From: Lorenzo <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.