Archived

This topic is now archived and is closed to further replies.

Math Problem

This topic is 6908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

i have the pitch and yaw angles along with a point in 3d space.how do i move it along the given direction?? i have employed the foll method-is it correct?? deltaX=dist * Sin(Yaw) * Cos(Pitch) deltaY=dist * Sin(Pitch) deltaZ=dist * Cos(Yaw) * Cos(Pitch) here the dist is the distance moved by the point in the particular direction and Yaw and Pitch are the angles made with the Y & X axis respectively. This formula fails when Yaw and Pitch are 45 degs=the vals i get are- here dist=1- deltaX=0.5 deltaY=1/(2^0.5) (one by root two!!) deltaZ=0.5 but the increments are supposed to be equal if they are inclined at 45 degs to both axes. Why is it like this? Pls help me out! Thanks a lot, Hey Witchlord ( Thanks a million for ur PATIENCE!!! ) sandeep_kl@mailcity.com

Share on other sites
You are doing it correctly, and no the increments are not supposed to be equal with yaw and pitch both 45 degrees. Unfortunately I don''t know how to explain why this is, other than that you should trust the math.

- WitchLord

Share on other sites
Hi WL,
I figured it out - (for once whew!! Out of the wicked spell at last)

Consider a point at (1,1,1)
the projection in the XZ plane is (1,0,1)
Now the pts Here the dst from x & z axis is 1 each.
while y is 1.414 more than x or y dsts.

thanx a lot!!

Jayanth.K

• 10
• 13
• 52
• 11
• 15