Notices
Results 1 to 9 of 9

Thread: 3D to 2D

  1. #1 3D to 2D 
    Forum Isotope Zelos's Avatar
    Join Date
    Jun 2006
    Posts
    2,755
    this is a mathematical problem i have tried to solve for so long but never done it.
    I ahve a coordinate system based on 3D with the coordinates x,y,z. But i have only a normal screen to display it, wich is x,y coordinates. And i have 2 axes wich they can move around, so its 2 angles. lets call them A and B. And u can constantly turn around this axes, so A and B can constantly be changed so u can see a object from different angles. So when A and B both = 0° what u would see would be purely the X and Y coordinate of the objects, but as they chance how do i turn X,Y,Z coordinates to X,Y coordinates when u know what value angle A and B is?


    Reply With Quote  
     

  2.  

    Related Discussions:

     

  3. #2  
    Forum Professor river_rat's Avatar
    Join Date
    Jun 2006
    Location
    South Africa
    Posts
    1,517
    Its a simple rotation matrix Zelos

    for example to rotate the X-Y axis (ie a Z rotation) by and angle Theta you would use the matrix

    X_new = Cos(Theta) X + Sin(Theta) Y + 0 Z
    Y_new = -Sin(Theta) X + Cos(Theta) Y + 0 Z
    Z_New = 0 X + 0 Y + 1 Z

    Just cyclicly permute the X, Y and Z to obtain the other 2 rotations and you just times rotations together to get what you want.


    As is often the case with technical subjects we are presented with an unfortunate choice: an explanation that is accurate but incomprehensible, or comprehensible but wrong.
    Reply With Quote  
     

  4. #3  
    Forum Isotope Zelos's Avatar
    Join Date
    Jun 2006
    Posts
    2,755
    how come Z doesnt have any trigometric function?
    Reply With Quote  
     

  5. #4  
    Forum Professor river_rat's Avatar
    Join Date
    Jun 2006
    Location
    South Africa
    Posts
    1,517
    Z doesnt have any trig functions as it is the axis that remains "still" during the rotation ie. we are rotating about the Z axis.

    You do know how to get the matrix representation of the system i posted, i couldnt work out an easy way of writing the matrix so i just wrote out the system. You need to multiply the corresponding matrices together to get your arbitrary rotation matrix, but remember the order in which you rotate matters.
    As is often the case with technical subjects we are presented with an unfortunate choice: an explanation that is accurate but incomprehensible, or comprehensible but wrong.
    Reply With Quote  
     

  6. #5  
    Forum Isotope Zelos's Avatar
    Join Date
    Jun 2006
    Posts
    2,755
    okey, im for some odd reason not familiar with this, could u plz write it with both axes?
    Reply With Quote  
     

  7. #6  
    Forum Professor river_rat's Avatar
    Join Date
    Jun 2006
    Location
    South Africa
    Posts
    1,517
    Do you want the rotation matrices for all three rotations?
    As is often the case with technical subjects we are presented with an unfortunate choice: an explanation that is accurate but incomprehensible, or comprehensible but wrong.
    Reply With Quote  
     

  8. #7  
    Forum Isotope Zelos's Avatar
    Join Date
    Jun 2006
    Posts
    2,755
    3 rotations? its only 2 axes u rotate around. In a world with N dimensions u need only N-1 axes to rotate around to see every possible angle around a object.- But if 3 is needed id like them. Btw id also like the other way around if u can fix it, so i get the X,Y coordinates to X,Y,Z
    Reply With Quote  
     

  9. #8  
    Forum Professor river_rat's Avatar
    Join Date
    Jun 2006
    Location
    South Africa
    Posts
    1,517
    Zelos - there are three co-ord. axis so you have three main rotations. They are


    for rotations around the X axis


    for rotations around the Y axis


    for rotations around the Z axis

    Try http://mathworld.wolfram.com/RotationMatrix.html for some more information but you form the required rotations by multiplying these matrices together.
    As is often the case with technical subjects we are presented with an unfortunate choice: an explanation that is accurate but incomprehensible, or comprehensible but wrong.
    Reply With Quote  
     

  10. #9  
    Forum Isotope Zelos's Avatar
    Join Date
    Jun 2006
    Posts
    2,755
    thx, i´ll try it right away
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •