Results 1 to 4 of 4
Like Tree1Thanks
  • 1 Post By MaxJasper

Math Help - Angle and Offset

  1. #1
    Newbie
    Joined
    Aug 2012
    From
    Netherlands
    Posts
    2

    Angle and Offset

    Hi,
    I am new to this forum, and I hope I am posting this in the right section.


    I am working on some code for some game, and I got stuck on a mathematical problem.


    I have a point ( in the image Point A) Where of I have this information:
    X, Y and Z coordinates
    Yaw, Pitch and Roll


    What I want to do is to calculate the X Y and Z coordinates of point B.
    The information I have about point B is an offset from point A.
    This offset is in the direction of the angles Yaw Pitch and Roll.


    An Image which hopefully makes my question totally clear.


    Link to Image
    Link to another image
    Does somebody know how to calculate the coordinates of point B?


    If anything isn't totally clear, please tell what it is. As I am Dutch, I'm not so good at describing my issue.


    Thanks in advance!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Aug 2012
    From
    london
    Posts
    15
    Thanks
    1

    Re: Angle and Offset

    This is 3D vector problem.

    You haven't provided enough information to solve this problem. Can you explain how the Yaw Pitch and Roll angles measured around these axes will tell you where "B" is? If "B" is purely dictated by an angle from these axes (Pitch Roll and Yaw), There will be a whole series of points along a straight line that satisfy this condition, so "B" will not be a single point. You also need a distance from A to B.

    Imagine attaching a string to the bottom corner of a room (where 2 walls meet the floor, so this is like x, y, and z axes at point A), and attaching the other end to something in the room (like a tv or something). The angles between any point along the string (point B), and the corners of the room (the axes), stay exactly the same. This means you can pick any point along the string, and the Yaw, pitch, and roll from A to that point are equal. Therefore, point B is variable unless you have a distance from A as well.
    Can you explain in more detail your problem please or provide more information?

    Please visit Facebook and Private maths tuition UK, online maths tuition UK, GCSE maths tuition UK to support us
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Aug 2012
    From
    Netherlands
    Posts
    2

    Re: Angle and Offset

    This is the exact situation:
    Point A is the precise center of a car. Point B is the position of the car's petrol cap.
    Coordinates of the car are given as X Y Z, and the rotation of the car is given as yaw pitch and roll.
    I know, for example, that the offset to the petrol cap is 0.8, -1.2, -0.2 is, so 0.8 coordinates (from the car's center) to the car's right, 1.2 throwards the car's back, and 0.2 to the car's bottom.
    With that information it should be possible (with sine and cosine) to calculate the coordinates of the petrol cap. But i don't know how..

    I hope this makes my question totally clear
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member MaxJasper's Avatar
    Joined
    Aug 2012
    From
    Canada
    Posts
    482
    Thanks
    54

    Lightbulb Re: Angle and Offset

    This is a case of successive rotations...so order of the 3 rotations is to be maintained.
    Assuming that rotations occur successively 1) gamma around z , 2) beta around y, 3) alpha around x...coordinates of points in the new rotated and translated system are {X, Y, Z} according to the following r-t equations:

    \left(\begin{array}{c} X_B \\ Y_B \\ Z_B\end{array}\right)\text{:=}\left(\begin{array}{  ccc} \cos (\beta ) \cos (\gamma ) & \sin (\alpha ) \sin (\beta ) \cos (\gamma )-\cos (\alpha ) \sin (\gamma ) & \cos (\alpha ) \sin (\beta ) \cos (\gamma )+\sin (\alpha ) \sin (\gamma ) \\ \cos (\beta ) \sin (\gamma ) & \sin (\alpha ) \sin (\beta ) \sin (\gamma )+\cos (\alpha ) \cos (\gamma ) & \cos (\alpha ) \sin (\beta ) \sin (\gamma )-\sin (\alpha ) \cos (\gamma ) \\ -\sin (\beta ) & \sin (\alpha ) \cos (\beta ) & \cos (\alpha ) \cos (\beta )\end{array}\right) \left(\begin{array}{c} x_B-x_A \\ y_B-y_A \\ z_B-z_A\end{array}\right)
    Thanks from ikkentim
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Quaternion offset new location
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: May 21st 2012, 11:56 PM
  2. OffSet Logarithmic Integral
    Posted in the Calculus Forum
    Replies: 3
    Last Post: September 30th 2010, 10:53 PM
  3. Replies: 6
    Last Post: July 23rd 2010, 08:40 AM
  4. xy coodinates of an offset of an ellipse
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: May 22nd 2010, 01:34 AM
  5. Offset in 2 global 3d rotation given euler angles
    Posted in the Differential Geometry Forum
    Replies: 0
    Last Post: April 1st 2009, 03:39 AM

Search Tags


/mathhelpforum @mathhelpforum