Rotating a vector about a new origin

In summary, you would need to rotate around the green x until the green y lies in the blue x-y plane, then rotate around the green y until the green and blue z's are parellel, and finally rotate around the z until the x's and y's are parallel.
  • #1
LigerZero
4
0
I have a point in 3d space at (x, y, z) with a rotation of (i, j, k) based from the origin (0, 0, 0) with a rotation of (0, 0, 0). What I would like to do is move the origin to a new position and rotation and have the point rotated with it. What series of calculations and manipulations need to be performed to get the point's new position and rotation values?
 
Physics news on Phys.org
  • #2
Welcome to PF!

Hi LigerZero! Welcome to PF! :smile:

A combination of two equal but opposite rotations about parallel axes is equal to a translation …

does that help?
 
  • #3
Not particularly. It's been quite awhile since I've done this sort of thing, so you'll need to be more specific on how to get each of those and use them to reach to final two values.
 
  • #4
LigerZero said:
I have a point in 3d space at (x, y, z) with a rotation of (i, j, k) based from the origin (0, 0, 0) with a rotation of (0, 0, 0). What I would like to do is move the origin to a new position and rotation and have the point rotated with it. What series of calculations and manipulations need to be performed to get the point's new position and rotation values?

I'm not quite sure what you're trying to say, but, generally, translation and rotation are handled separately. The translation accounts for the difference in origins and the rotation accounts for the difference in the direction of the axes.
 
  • #5
I'm trying to do something like this:
http://img28.imageshack.us/img28/8945/vectorq.th.jpg [Broken]

The pyramid is linked to the box. I have the positions and rotations of both the green box and the green pyramid. The axis intersecting the green box is at (0, 0, 0) with a rotation of (0, 0, 0). I want to move and rotate this group to the new axis centered in the purple box. I have that position and rotation. What I need to know is how to calculate the new rotation and position of the red pyramid.
 
Last edited by a moderator:
  • #6
LigerZero said:
I'm trying to do something like this:
http://img28.imageshack.us/img28/8945/vectorq.th.jpg [Broken]

The pyramid is linked to the box. I have the positions and rotations of both the green box and the green pyramid. The axis intersecting the green box is at (0, 0, 0) with a rotation of (0, 0, 0). I want to move and rotate this group to the new axis centered in the purple box. I have that position and rotation. What I need to know is how to calculate the new rotation and position of the red pyramid.

Determine the position of the green pyramid relative to the green origin. Rotate so the green axes are parallel to the blue axes (rotation). This gives you the location of the green pyramid relative to the green origin, but in the blue coordinate system. Add in the difference between the blue origin and the green origin (translation).

You need 3 rotations. The straight forward method is to rotate around the green x until the green y lies in the blue x-y plane. Then rotate around the green y until the green and blue z's are parellel. Then rotate around the z until the x's and y's are parallel. The angles have to be something you can determine (roll, pitch, yaw, for example).

If those 3 angles are hard to define, you can take advantage of the fact that a ZXZ rotation duplicates the XYZ rotation (right ascension of ascending node, inclination, argument of perigee, for example).

Watch out for singularities if you use Euler angles (the rotations described in the previous paragraphs). Most programmers use quaternions or direction cosine matrices for the graphics in video games, since those two methods don't have singularities (even though they're harder methods to learn).
 
Last edited by a moderator:
  • #7
Assuming it's possible to use either of those methods (this game doesn't provide those systems, but looking around, it should be possible to implement them), what would I need to do, step-by-step, to get the new rotation and position?
 

What is the concept of rotating a vector about a new origin?

Rotating a vector about a new origin means changing the position or direction of a vector in a coordinate system. The new origin serves as the center point for the rotation.

How is a vector rotated about a new origin?

A vector can be rotated about a new origin by using mathematical formulas and transformations. The vector's coordinates are multiplied by a rotation matrix to determine the new coordinates after rotation.

What is a rotation matrix?

A rotation matrix is a 2D or 3D matrix that represents the transformation needed to rotate a vector about a given angle and axis. It is used in vector algebra and linear algebra to perform rotations in a coordinate system.

What is the difference between rotating a vector about a new origin and a fixed origin?

Rotating a vector about a new origin changes the position of the vector relative to a new point, while rotating a vector about a fixed origin changes its direction but keeps its position relative to the original point. In both cases, the vector's magnitude remains the same.

What are some applications of rotating a vector about a new origin?

Rotating a vector about a new origin has various applications in fields such as computer graphics, robotics, and physics. It can be used to simulate 3D rotations, manipulate objects in 3D space, and calculate the movement of objects in 2D and 3D environments.

Similar threads

Replies
2
Views
709
Replies
19
Views
981
Replies
4
Views
683
  • Mechanics
Replies
2
Views
766
Replies
4
Views
786
  • Mechanics
Replies
14
Views
1K
Replies
14
Views
2K
Replies
17
Views
1K
Replies
7
Views
1K
Back
Top