Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. function newPos = rotateOrbit(vec, th)
  2. %rotation vector in degrees
  3. rmat = [cosd(th), -sind(th), 0;
  4. sind(th), cosd(th), 0;
  5. 0, 0, 1];
  6. %multiply them to get the rotated position
  7. newPos = rmat * vec;
  8.  
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement