View Full Version : How to write "d = norm(cross(BA,PA))/norm(BA)" in maya expression?
deluxmilkman 03292012, 02:41 PM d = norm(cross(BA,PA))/norm(BA);
This is a formula for finding the distance between a point and a line segment in 3D space.
A, B, and P are all vectors.
Maya expression is not taking "norm" procedure.
Thaks


NaughtyNathan
03292012, 03:17 PM
there is no procedure "norm". I think you want "unit"
haggi
03292012, 03:54 PM
I suggest the usage of mag() because I suppose you need the length of the vectors.
deluxmilkman
03292012, 04:04 PM
yeah, the fornula was wrong.
it was mag.
d = (P  A) x (P  B) / (B  A)
where ".." denotes the magnitude value (positive) and "x" is the cross product.
thanks.
CGTalk Moderation
03292012, 04:04 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©20002014, Jelsoft Enterprises Ltd.