Coordinates of line in sphere with x,y rotation

3danglerotations

Lets say that I have a line with one end fixed to the center of a sphere, and the other end can freely rotate. If I were to rotate the line around the x and y axes, what would the coordinates be for the freely-rotating end?

Here's what I need this for:

I have a rectangle, and need to find the coordinates of each vertex when the rectangle is rotated (the rectangle will be rotated from its center at (0,0,0), and can have any width and height). I only need to rotate the rectangle around the x,y (or any pair really, but x,y are just a nice looking pair), because rotating the unincluded axis will be like rolling a pencil back and forth in your thumb.

I have found some helpful resources for questions similar to mine, but they don't solve my problem. For example, this here I've tried to understand, but I have minimal experience with matrices, and this doesn't exactly solve my problem.

Best Answer

  1. Let's take the sphere to be centered at the origin, (0,0,0).
  2. You say we have a line with one end fixed at the origin; say that the point on this line which is distance 1 from the origin is $v =(a,b,c).$ When I rotate $v$ around the $z$ axis, I won't change it's $z$ coordinate--this will still be $c.$ If I rotate by an angle of $\theta,$ the output vector will be $(cos(\theta)a - sin(\theta)b, sin(\theta)a + cos(\theta)b, c).$
Related Question