Advertisement
Guest User

Rotate Y

a guest
Feb 20th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. def rotate_y(vert, theta=60):
  2. sin_theta = np.sin(theta)
  3. cos_theta = np.cos(theta)
  4. vertex = vert.copy()
  5. vertex[:,0] = vert[:,0] * cos_theta + vert[:,2] * sin_theta
  6. vertex[:,2] = vert[:,2] * cos_theta - vert[:,0] * sin_theta
  7. return vertex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement