
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
February 21st, 2008, 12:47 AM  #1 
Newbie Joined: Feb 2008 From: Yorkshire, England Posts: 2 Thanks: 0  Rotation of multiple points in 3D...
I'm not sure if this is in the right place but I'm pretty sure it falls under Trig. Thank you in advance for anyone who can or tries to help I'm trying to write a simple program and am struggling with the maths side of things. Basically what this program will do is allow the user to enter values for multiple points in 3d. So point one would be 0,0,0 obviously. Then for point two they might say "Up: 30, Left: 100, Forward: 20". Point three would be the same but would begin from where point two ended. Think of it as a simple 3d drawing tool. This is simple enough, where I'm falling down is the point of the program. It outputs straight lengths, angles and rotation. So if the user were to tell the program to draw a 200 length 'U' shape, it'd output the following; 1: Straight 200; Rotation 0; Angle 90° 2: Straight 200; Rotation 0; Angle 90° 3: Straight 200 I'm fine with the math behind getting the angle's and straight lengths. Hypotenuse takes care of both. The rotation is the problem. I can't get my head around the math of working out how far (in degrees) the next point is rotated from the last point. So if the last leg of the 'U' shape went forward or backwards instead of down, the output would read; 1: Straight 200; Rotation 0; Angle 90° 2: Straight 200; Rotation 90°; Angle 90° 3: Straight 200 If anyone knows a formula, or can at least point me in the direction of the area of math I need to be looking at to work this one out it would be most appreciated. If anything isn't clear enough let me know. 
February 21st, 2008, 06:38 AM  #2 
Senior Member Joined: Oct 2007 From: Chicago Posts: 1,701 Thanks: 3 
It seems like you want to be looking at Spherical coordinates Essentially, you have 3 values, traditionally ρ,θ,ϕ, I'll use r,t,p, for the sake of ease. r is the straight line distance to the point (your radius, sqrt(x^2+y^2+z^2)), t is the angle around the xy plane (as in polar coordinates), and p is the angle off the positive z axis. Check the wikipedia article, if you're looking for more detail, let us know. Cheers. 
February 21st, 2008, 06:58 AM  #3 
Global Moderator Joined: Dec 2006 Posts: 21,131 Thanks: 2340 
How does the program specify the axis of rotation?

February 21st, 2008, 08:26 AM  #4 
Newbie Joined: Feb 2008 From: Yorkshire, England Posts: 2 Thanks: 0 
cknapp  Thank you, I'll look into Spherical Coordinates when I get home from work. skipjack  I don't fully understand your question. Do you mean how it displays the rotation (in + or  degrees) or how it interperets the rotation. If it's the latter basically think of it as every angle must be along the same two dimensional plane. So imagine we had one point that could only move in X and Y and whatever x,y,z coordinates the user entered pass through this point. When it reaches an angle that veers off into Z, the program would display in degrees how much to rotate it to bring the next straight length into the same two dimensional plane. I think this is what you were asking, let me know if not. 

Tags 
multiple, points, rotation 
Search tags for this page 
Click on a term to search for related topics.

Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
accumulation points or limits points  alice 9  Real Analysis  24  November 13th, 2010 03:27 PM 
From relative rotation to absolute rotation in 3D space  Maegfaer  Algebra  1  August 27th, 2010 10:01 PM 
Matrix Rotation with Center Points  lampshade  Linear Algebra  1  June 14th, 2010 06:15 PM 
probability of multiple events with multiple trials  prwells32  Advanced Statistics  4  January 30th, 2010 03:42 PM 
3D rotation  Ryan  Computer Science  0  December 27th, 2007 04:04 PM 