Advertisement

02.18.2008 at 01:09AM PST, ID: 23170871
[x]
Attachment Details

Calculate heading between two points

Asked by ZTJANK in 3D Game Programming, Math & Science

Tags:

Assume you are in Cartesian space at coordinates {32, 99, -6}.   You are traveling to coordinates  {-16, 44, 36}.  There are two headings (bearings/directions) to find, the angle at which you must move on the x and y axis towards your destination and the angle at which you must move up or down on the z axis to reach your destination.  Angles for the x,y axes range from 0 to 360 degrees, whereas angles for the z axis range from 90 degrees (straight up) to -90 degrees (straight down).   The distance between the previous two coordinates is 84.219 units.  Assuming you have no acceleration (you move at 1 unit/second, there is no speeding up or slowing down), at which angles do I need to move on the x,y axis and which angle on the z axis if I move forwards 84.219  units and how do you calculate this?

Am I right in assuming I need to convert to spherical coordinates?  Thanks!Start Free Trial
[+][-]02.18.2008 at 01:27AM PST, ID: 20918633

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: 3D Game Programming, Math & Science
Tags: Spherical Coordinates, Vector, Trigonometry, Geometry, Vector Algebra, 3D
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.18.2008 at 01:58AM PST, ID: 20918738

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.18.2008 at 02:12AM PST, ID: 20918777

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.18.2008 at 02:16AM PST, ID: 20918787

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.18.2008 at 02:28AM PST, ID: 20918829

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628