How to change a point to another orientation?

Discussion in 'iOS Programming' started by idonotliketostu, Feb 10, 2011.

  1. idonotliketostu macrumors 6502

    Feb 28, 2008

    grid1 is a regular ( x y z ) grid
    grid2 is like grid 1 but rotated +45 degrees along the z axis (a yaw of 45)
    grid 1 and 2 touch at origin

    a dot grid 2 has points (1,1,500);
    x = 1
    y = 1
    z = 500;

    the same point viewed from a "global perspective" on grid 1 would have points
    x = sqrt2
    y = 0;
    z = 500;

    My solution was to rotate grid2 one axis at a time until it looked like grid1 while updating the changing points. (rotate around z axis changes points x and y; rotate around y axis changes points z and x)

    My question is..
    Is there a known formula to change the point from grid 2 to grid 1?
  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset

Share This Page