rotate_mesh: Rotate a mesh around an axis

View source: R/mesh_utils.R

rotate_meshR Documentation

Rotate a mesh around an axis

Description

Rotate a mesh around an axis

Usage

rotate_mesh(mesh, angle_rad, axis = c(0, 0, 1))

Arguments

mesh

A mesh descriptor list.

angle_rad

Rotation angle in radians.

axis

Length-3 numeric vector defining the rotation axis.

Value

A new mesh descriptor list with rotated vertices.

Examples

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, ]


scimesh documentation built on Aug. 9, 2026, 9:07 a.m.