| rotate_mesh | R Documentation |
Rotate a mesh around an axis
rotate_mesh(mesh, angle_rad, axis = c(0, 0, 1))
mesh |
A mesh descriptor list. |
angle_rad |
Rotation angle in radians. |
axis |
Length-3 numeric vector defining the rotation axis. |
A new mesh descriptor list with rotated vertices.
mesh <- generate_cuboid(c(0, 0, 0), c(1, 1, 1))
rotated <- rotate_mesh(mesh, pi / 4, axis = c(0, 1, 0))
rotated$vertices[1, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.