torus_mesh {rayvertex} | R Documentation |
Torus 3D Model
Description
Torus 3D Model
Usage
torus_mesh(
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),
radius = 0.5,
ring_radius = 0.2,
sides = 36,
rings = 36,
material = material_list()
)
Arguments
position |
Default |
scale |
Default |
angle |
Default |
pivot_point |
Default |
order_rotation |
Default |
radius |
Default |
ring_radius |
Default |
sides |
Default |
rings |
Default |
material |
Default |
Value
List describing the mesh.
Examples
if(run_documentation()) {
#Plot a group of tori in the cornell box
generate_cornell_mesh(ceiling = FALSE) |>
add_shape(torus_mesh(position=c(555/2,555/3,555/2), angle=c(20,0,45),
radius=120, ring_radius = 40,
material = material_list(diffuse="dodgerblue4",type="phong",
ambient="dodgerblue4",ambient_intensity=0.2))) |>
add_shape(torus_mesh(position=c(400,400,555/2), angle=c(20,200,45),radius=80, ring_radius = 30,
material=material_list(diffuse="orange",type="phong",
ambient="orange",ambient_intensity=0.2))) |>
add_shape(torus_mesh(position=c(150,450,555/2), angle=c(60,180,0),radius=40, ring_radius = 20,
material=material_list(diffuse="red",type="phong"))) |>
rasterize_scene(light_info = directional_light(c(0,1,-2)))
}
[Package rayvertex version 0.11.4 Index]