mesh3d_mesh {rayvertex} | R Documentation |
Mesh3d 3D Model
Description
Mesh3d 3D Model
Usage
mesh3d_mesh(
mesh,
center = FALSE,
position = c(0, 0, 0),
scale = c(1, 1, 1),
angle = c(0, 0, 0),
pivot_point = c(0, 0, 0),
order_rotation = c(1, 2, 3),
materialspath = NULL,
material = material_list()
)
Arguments
mesh |
Mesh3d object. |
center |
Default |
position |
Default |
scale |
Default |
angle |
Default |
pivot_point |
Default |
order_rotation |
Default |
materialspath |
Default |
material |
Default |
Value
List describing the mesh.
Examples
if(run_documentation()) {
# Read in a mesh3d object and rasterize it
library(Rvcg)
data(humface)
mesh3d_mesh(humface,position = c(0,-0.3,0),scale = 1/70,
material=material_list(diffuse="dodgerblue4", type="phong", shininess=20,
ambient = "dodgerblue4", ambient_intensity=0.3)) |>
rasterize_scene(lookat = c(0,0.5,1), light_info = directional_light(c(1,0.5,1)))
}
if(run_documentation()) {
# Subdivide the mesh for a smoother appearance
mesh3d_mesh(humface,position = c(0,-0.3,0),scale = 1/70,
material=material_list(diffuse="dodgerblue4", type="phong", shininess=20,
ambient = "dodgerblue4", ambient_intensity=0.3)) |>
subdivide_mesh() |>
rasterize_scene(lookat = c(0,0.5,1), light_info = directional_light(c(1,0.5,1)))
}
[Package rayvertex version 0.11.4 Index]