#### Archived

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

# 3D Movement Problems

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

## Recommended Posts

This is probably such a novice question.....but, I have a point in 3D space (x,y,z) and i wish to be able to move the point based on a direction given by an angle or angles. My questions are as follows: 1. How many angles are needed to allow complete freedom of movement in the 3D space. 2. What are the calculations to do this? I can do this in 2D space easily. All you need is a point (x,y) and just one angle. The calculations are x = magnitude * sin(x) and y = magnitude * cos(y). When I add a z axis and an extra angle the problems begin.

##### Share on other sites
In the last term , we saw the spherical coordiate system and cylindirical coordinate system.Maybe they can help you :

Cylindirical C.S :
x = r * cos Q where Q is the angle between r and x axis.
y = r * sin Q
z = z

Spherical C.S :
x = q * sin x * cos Q where Q is the angle between q and x axis
y = q * sin x * sin Q where x is the angle between q and z axis
z = q * cos x

(these systems are alternative to the rectangular coordinate system to reduce the calculation time while finding the volume,area,Mass etc.)

Or other way think the 3D axis in three components.Say xy,xz,yz.
For example the point in space(x,y,z) goes from (1,2,3) to (50,20,30).
So
(1,2) to (50,20) in xy
(2,3) to (20,30) in yz
(1,3) to (50,30) in xz

As you see last is so convenient and not complex

##### Share on other sites
Cheers Xelon

The Spherical C.S thingy is what I was after although the last method you said would indeed be much faster, so i''ll give that a try as well.

##### Share on other sites
If you try the last method, you''ll have to mess around with the Gimbal lock problem. If you have orientation problems with that system, google "gimbal lock."

##### Share on other sites
quaternions provide a solution for gimbal lock. They let u rotate around an arbitrary axis, not just x,z, or y-axis

##### Share on other sites
To quote Chris Hecker:
"It''s possible to prove that no three-scalar parameterization of 3D orientation exists that doesn''t suck, for some suitably mathematically rigorous definition of ''suck''"

http://www.d6.com/users/checker/pdfs/gdmphys4.pdf

Spherical coord''s (SC''s) can handle 2 DOF, but don''t give you all 3. Picture a plane (the flying kind). SC''s can make the plane do a nose dive, or pull up. They can also make the plane change direction, say, instead of going to New York, turn and go to Florida. But, they can''t handle the plane tipping its wings, along with the other 2.

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633678
• Total Posts
3013290
×