Results 1 to 3 of 3

Math Help - Quaternions xz rotation with preserved y

  1. #1
    Newbie sjcomp's Avatar
    Joined
    Dec 2007
    Posts
    15

    Quaternions xz rotation with preserved y

    Before we go into math this is the common life explanation of the problem that I try to simulate: I have a piece of a tape (thin, wide, and long). One end of it is attached to a surface with a pin (tape can rotate around the pin). I can move the other end of the tape around as I wish. I'm using quaternions to calculate the rotation of the tape. But there is a problem shown in the illustration:

    When I move the free end point around, the tape rotates around Y axis (around the axis that goes through its long side). I would like to get rid of this rotation. If you imagine this tape laying flat on the table, when I move the end point around, the tape is not laying flat anymore, but could be standing on its side.
    So this is the question: How do I control the rotation along Y axis in a quaternion?
    (I can supply the details on how I actually come up with quaternion that represents this partially wrong result, if that is of any help)
    Thanks a lot.
    Last edited by sjcomp; January 3rd 2008 at 08:34 AM. Reason: Fixing axis names
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,888
    Thanks
    326
    Awards
    1
    Quote Originally Posted by sjcomp View Post
    Before we go into math this is the common life explanation of the problem that I try to simulate: I have a piece of a tape (thin, wide, and long). One end of it is attached to a surface with a pin (tape can rotate around the pin). I can move the other end of the tape around as I wish. I'm using quaternions to calculate the rotation of the tape. But there is a problem shown in the illustration:

    When I move the free end point around, the tape rotates around Y axis (around the axis that goes through its long side). I would like to get rid of this rotation. If you imagine this tape laying flat on the table, when I move the end point around, the tape is not laying flat anymore, but could be standing on its side.
    So this is the question: How do I control the rotation along Y axis in a quaternion?
    (I can supply the details on how I actually come up with quaternion that represents this partially wrong result, if that is of any help)
    Thanks a lot.
    May I ask why you are using quaternions? The rotation group works quite well for this kind of problem and is much simpler in application.

    -Dan
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie sjcomp's Avatar
    Joined
    Dec 2007
    Posts
    15
    Quote Originally Posted by topsquark View Post
    May I ask why you are using quaternions? The rotation group works quite well for this kind of problem and is much simpler in application.
    I am using quaternions because I'm simulating this situation using 3D graphical engine, which uses quaternions by default (though it can use matrices or Euler rotations as well). Basically I have to change an orientation of an object and given it's facing direction (v1) and the desired facing direction (v2) I can calculate the quaternion that would create a proper change in the orientation. The problem with this approach is that it does not account for the desired Y rotation of my object.
    I do not know what rotation groups are (Euler angles?). Could you tell me more about how I can go from having three vectors (initial object direction, surface [to which tape is attached] normal direction, and desired direction of the tape) to three rotational angles, or a rotational matrix, or a quaternion?
    Thanks.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Quaternions, rigid body rotation (matlab)
    Posted in the Advanced Applied Math Forum
    Replies: 1
    Last Post: October 15th 2012, 06:43 AM
  2. Replies: 0
    Last Post: January 14th 2012, 08:02 PM
  3. Quaternions and Rotation?
    Posted in the Advanced Algebra Forum
    Replies: 6
    Last Post: March 21st 2011, 01:48 AM
  4. quaternions
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: December 30th 2008, 05:07 PM
  5. Quaternions
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: September 28th 2008, 10:34 AM

Search Tags


/mathhelpforum @mathhelpforum