Sunday, August 14, 2016

3d - Solving for velocity in the x/y/z axes?


In a 3D environment I have an object with a displacement x that I know I need to traverse in a given time interval. I have the object's heading and elevation and I want to figure out the distance the object needs to travel on the x/y/z axis to move x units in the given direction. How can I calculate this? Are there two distinct ways to calculate it (using trigonometry or linear algebra)? Which way is the best in what scenarios?


EDIT: To clarify, I will make an analogy to a simple 2D scenario that is similar to the 3D scenario I'm working with. Let's say the object has an angle of 35 degrees from the x-axis. Making a right triangle, let's say we know that the hypotenuse (or displacement of the object) is 10 units. Now to figure out the x and y deltas to get from the object's current position to the object's new position 10 units away at a 35 degree angle, you simply do:


x = 10 * cos(35) 

y = 10 * sin(35)

I simply need to solve the same problem except in 3 dimensions.




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...