1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

3D Rotation

  1. Dec 28, 2007 #1
    Hi all,

    I wanted to know if anyone had any advise on how to transform a 2D geometric shape into a 3D one.

    I have some 2D shape which is given by the equation f(x,y) = const. = k.

    I wish to rotate this 2D shape into the 3rd dimension by an angle theta and then write down what the 3D function is g(x,y,z) in terms of f(x,y) and the angle theta.

    Any advise would be appreciated!

  2. jcsd
  3. Dec 28, 2007 #2
    Okay ... you have a curve lying in the x-y plane, right? And now you're going to "flip" it up in the z direction? Well, first, what's the axis of rotation? x-axis? y-axis? Some other line in the x-y plane? You need to decide that first.

    Once you've done that, you'll need to think about where the height z comes from, as you rotate this curve. Each point on the curve should follow a circular arc about your chosen axis of rotation, so how would you describe this circle?
    Last edited: Dec 28, 2007
  4. Dec 28, 2007 #3
    do you know how to use rotation matrices?
  5. Dec 28, 2007 #4
    Ye, just catching up on it again now... I think I found a 3x3 matrix that should do the job.
  6. Dec 28, 2007 #5
    I'd like to add something more, besides what the above two posters have pointed out. But first I'm summing up what they said:
    A) You're missing one data to be defined: the axis of rotation.
    B) Expressing the rotation as a (multiplying) matrix is easier.

    Now, my two cents: in order to fit in B), your data points and functions f and g are better expressed in terms of vectors. For example, use the vector v = [x y 0] to represent the 2D point (note the z=0 coordinate), and the vector v' = [x' y' z'] to represent the 3D point after the rotation. Now your functions should look like f(v)=k and g(v')=k.

    Then, when you have defined a matrix M to convert v' into v (probably as the inverse of the matrix that converts v into v'), then, since v = Mv', you'll obtain g(v') = f(Mv') = k as the function you're looking for.
  7. Dec 28, 2007 #6
    see i was thinking about that but i don't think that's true. if you treat the function that plots the curve in xy space as on transformation and the rotation as another transformation then you can simply just compose one with the other? is this true?
  8. Dec 28, 2007 #7
    Note that the matrix M in my post do not represent the rotation, but the inverse of the rotation, actually. Other than that, I don't see why not; I tried to define how the vectors should look like, precisely to be able to apply a composition. Where do you see a potential problem?
  9. Dec 28, 2007 #8
    Ok, thanks for your help, I think I have solved this problem now using a matrix multiplication. I checked by curves using Mathematica and they look very reasonable.
  10. Jan 4, 2008 #9
    To add to this topic... does the order of rotations matter? If you are using matrices one would think it was non-commutative, but intuition suggests that the order of rotations should not affect the final geometry.

    Also, if you have two or three rotations, then these can always be expressed as just one matrix which is the Euler matrix, right? R(alpha,beta,gamma)

    My problem with the Euler rotation matrix is the fact alpha beta and gamma refer to rotations about z, y' and z'' respectively. Is there a way of writing the matrix as a rotation about x, y and z?

    Last edited: Jan 4, 2008
  11. Jan 4, 2008 #10
    I think an alternative way of asking this question is can I perform a rotation of the 2D shape f(x,y) about a straight line y=g(x) and get x', y' and z'?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook