Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function newPos = rotateOrbit(vec, th)
- %rotation vector in degrees
- rmat = [cosd(th), -sind(th), 0;
- sind(th), cosd(th), 0;
- 0, 0, 1];
- %multiply them to get the rotated position
- newPos = rmat * vec;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement