Rotating Vectors: How to Rotate a Vector 90 Degrees Towards a Specific Direction

  • Thread starter Thread starter sparkzbarca
  • Start date Start date
  • Tags Tags
    Rotating Vector
AI Thread Summary
To rotate a normalized vector X by 90 degrees towards the up vector {0,1,0}, one can utilize a rotation matrix. The discussion clarifies that rotation occurs around an axis, which can be determined using the cross product of the up vector and vector X. It emphasizes the importance of understanding the relationship between vectors and angles, suggesting that using radians may be necessary. A resource on rotation matrices is provided for further guidance. The original poster indicates they have resolved their issue, demonstrating the effectiveness of the shared information.
sparkzbarca
Messages
7
Reaction score
0
This isn't actually a homework question, I'm programming something, it's just what should be fairly simple math I'm just not certain how to do it.

Assume I have a normalized vector which points directly up {0,1,0}.

I also have another vector X.

I'd like to rotate vector X along the

crossmultiply(up,vector x) axis
(i know how to cross multiply)

90 degrees towards {0,1,0}

but basically i'd no idea how to convert vectors to angles or maybe I need to use radians,
if it helps the axis and the up can be normalized so that it can be assumed your working on the unit circle if that makes it easier to find.

If you could help me or even just point me to a web resource that helps that'd be appreciated, i tried looking up vectors to angles but didn't really seem to get anywhere.
 
Physics news on Phys.org
sparkzbarca said:
This isn't actually a homework question, I'm programming something, it's just what should be fairly simple math I'm just not certain how to do it.

Assume I have a normalized vector which points directly up {0,1,0}.

I also have another vector X.

I'd like to rotate vector X along the

crossmultiply(up,vector x) axis
?
I don't know what you mean by this. You don't rotate a vector along an axis - you rotate it around some vector.
sparkzbarca said:
(i know how to cross multiply)

90 degrees towards {0,1,0}

but basically i'd no idea how to convert vectors to angles or maybe I need to use radians,
if it helps the axis and the up can be normalized so that it can be assumed your working on the unit circle if that makes it easier to find.

If you could help me or even just point me to a web resource that helps that'd be appreciated, i tried looking up vectors to angles but didn't really seem to get anywhere.

You can use a rotation matrix to rotate a vector. See the wiki article, http://en.wikipedia.org/wiki/Rotation_matrix.
 
Oh i understand a vector rotates around another vector but to me at least axis is short for the vector around which something rotates. I believe I solved the dilemma but thank you!
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks
Back
Top