How to Rotate a Velocity Vector: Maths & Logic

In summary, the mathematician would need to use a rotation matrix to change the direction of the vector.
  • #1
wraithseeker
29
0
Lets say I have a velocity vector that's going to the east and I want it's direction to change to somewhere else like west, how would I be able to do that?

What would be the maths required for this? The velocity vector already have a length and a direction.
 
Physics news on Phys.org
  • #2
You'd use a rotation matrix which is an example of a change of basis. The type of math is linear algebra
 
  • #3
assuming you're working 2D (no up or down) the matrix to rotate a vector by theta is [itex]\begin{bmatrix}
\cos \theta & \sin \theta \\[3pt]
-\sin \theta & \cos \theta \\
\end{bmatrix}[/itex]
 
  • #4
I searched wikipedia but it was too confusing so i asked for help here.

EDIT: what about 3D?
 
  • #5
3D's a little more complicated since rotations do not commute. For example, if you think of an airplane it can do 3 things it can pitch, roll and yaw http://www.ultimatepointer.com/images/YawPitchRoll.jpg Now the thing is that order matters. If you were to roll 90 degrees and then yaw 90 degrees your plane would not be in the same orientation then if you were to yaw 90 degrees then pitch 90 degrees. This means there's no one matrix to rotate any vector to any vector you instead have to think about the orientation and apply multiple in sequence, in the correct sequence (like pitch,roll,yaw). This should help http://en.wikipedia.org/wiki/Rotational_matrix if you haven't found it yet.
 
Last edited by a moderator:
  • #6
For 2D I still don't really get you, do I multiply it by cos angle and sin angle or the one below?

Or do I subtract it.
 
  • #7
Have you never covered matrix multiplication?

[itex]\begin{bmatrix}
\cos \theta & \sin \theta \\[3pt]
-\sin \theta & \cos \theta \\
\end{bmatrix}\begin{bmatrix}
x \\[3pt]
y\\
\end{bmatrix}=\begin{bmatrix}
\cos\theta x + \sin \theta y \\[3pt]
-\sin \theta x + \cos \theta y\\
\end{bmatrix}[/itex]

so you get the new x is [itex]\cos\theta x + \sin \theta y[/itex] and the new y is [itex]-\sin \theta x + \cos \theta y[/itex]
 
  • #8
In general for 2x2 matrices:

[itex]\begin{bmatrix}
a& b\\[3pt]
c & d \\
\end{bmatrix}\begin{bmatrix}
x \\[3pt]
y\\
\end{bmatrix}=\begin{bmatrix}
a x + b y \\[3pt]
c x + d y\\
\end{bmatrix}[/itex]
 
  • #9
For rotations in 3 dimensions, you need to state an axis of rotation as well as an angle. That's why they are so much complicated.
 
  • #10
Is it taken in radians or degrees currently?

Here's how I tried to apply it

vx = Cos(angle)*vx+ Sin(angle)*vy
vy = -Sin(angle)*vx+Cos(angle)*vy

vx = velocity X
vy = velocity Y
angle = new angle
 
  • #11
Doesn't matter, the cosine of 90 degrees is the same as the cosine of 0.5*\pi. One note, the angle \theta is not the "new" angle, it is the angle of rotation.
 
  • #12
Ok a slighty offtopic question, is rotating a vector the same as changing the direction of a vector? How would you change the direction of a vector?

vx = vx *Cos(angle)
vy = vy *Sin(angle)

or am I wrong?
 
  • #13
wraithseeker said:
Ok a slighty offtopic question, is rotating a vector the same as changing the direction of a vector? How would you change the direction of a vector?

vx = vx *Cos(angle)
vy = vy *Sin(angle)

or am I wrong?

This formula does not preserve the vector's magnitude.
 
  • #14
Where can I find it? I googled to no avail too.
 
  • #15
wraithseeker said:
Where can I find it? I googled to no avail too.

maverick already gave you the rotation matrix for a 2D Cartesian coordinate system. If you want to rotate a vector, you use the appropriate rotation matrix. If you want to make a vector point in a desired absolute direction then you simply make a unit vector that points in the desired direction and scale it to the desired length.
 
  • #16
I tried that but it didn't work that's why I asked about the direction.

vx = Cos(angle)*vx+ Sin(angle)*vy
vy = -Sin(angle)*vx+Cos(angle)*vy

I did something like this.

Imagine actual angle is the front of the person but after setting the values, I set it to be 90 degrees that will be converted to radians but it bugs as the example shown above.

The angle of the ball thrown is always different from any position.
 
  • #17
What example? If it's 90 degrees then the rotation is straightforward:

v_x = v_y;
v_y = -v_x;

If our vector is (0,1), we can see that we easily get the correct vector of (1,0). Note that maverick's rotation matrix is a clockwise rotation with respect to the traditional x-y plane orientation.
 
  • #18
I solved it, thanks guys.
 
  • #19
Hi am new to this forum, i am working on spherical modal analysis. I need some help in rotation . One of the step in my analysis is to align the axis of reference of the field waves of the radiator to the axis of the dielectric lens. How should i proceed and do i have to use rotation matrix? Is rotation matrix different from wigner rotation matrix? Which matrix should i employ ?

If my question is absurd pls ask me so that i can put my question clearly...
 

1. How do you calculate the angle of rotation for a velocity vector?

The angle of rotation can be calculated using the dot product and cross product of two vectors. First, find the dot product of the initial and final velocity vectors. Then, find the magnitude of the cross product of the two vectors. Finally, use the arctan function to find the angle of rotation.

2. Can you provide an example of rotating a velocity vector in 2D?

Yes, for example, let's say we have an initial velocity vector of (5, 0) and we want to rotate it 90 degrees counterclockwise. Using the formula from the previous question, the dot product would be 0 and the cross product would be -5. The resulting angle of rotation would be -pi/2 radians or -90 degrees. The rotated vector would then be (0, 5).

3. How does the direction of rotation affect the resulting velocity vector?

The direction of rotation will determine whether the resulting velocity vector is rotated clockwise or counterclockwise. A positive angle of rotation will result in a counterclockwise rotation, while a negative angle of rotation will result in a clockwise rotation.

4. Can you rotate a velocity vector in 3D?

Yes, the same principles of calculating the angle of rotation apply in 3D, but with the addition of a third component. The cross product will now be a vector in 3D space, and the resulting angle of rotation will be around an axis instead of a single plane.

5. Are there any limitations or restrictions when rotating a velocity vector?

Yes, there are a few limitations to keep in mind when rotating a velocity vector. Firstly, the initial and final velocity vectors must be in the same plane. Additionally, the angle of rotation should be relatively small, otherwise, the resulting vector may not accurately represent the original vector's direction.

Similar threads

Replies
19
Views
1K
Replies
2
Views
10K
Replies
4
Views
862
  • Mechanics
Replies
3
Views
974
  • Mechanics
Replies
2
Views
616
Replies
7
Views
899
Replies
15
Views
2K
Replies
5
Views
910
Replies
9
Views
877
Back
Top