sphere_mesh {rayvertex} | R Documentation |
Sphere 3D Model
Description
Sphere 3D Model
Usage
sphere_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 = 1,
low_poly = FALSE,
normals = TRUE,
material = material_list()
)
Arguments
position |
Default |
scale |
Default |
angle |
Default |
pivot_point |
Default |
order_rotation |
Default |
radius |
Default |
low_poly |
Default |
normals |
Default |
material |
Default |
Value
List describing the mesh.
Examples
if(run_documentation()) {
#Generate a sphere in the Cornell box.
generate_cornell_mesh() |>
add_shape(sphere_mesh(position = c(555/2, 555/2, 555/2), radius = 100)) |>
rasterize_scene(light_info = directional_light(c(0,0.5,-1)))
}
if(run_documentation()) {
#Generate a shiny sphere in the Cornell box
generate_cornell_mesh() |>
add_shape(sphere_mesh(position = c(555/2, 100, 555/2), radius = 100,
material = material_list(diffuse = "gold",type="phong"))) |>
rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
if(run_documentation()) {
#Generate an ellipsoid in the Cornell box
generate_cornell_mesh() |>
add_shape(sphere_mesh(position = c(555/2, 210, 555/2), radius = 100,
angle=c(0,30,0), scale = c(0.5,2,0.5),
material = material_list(diffuse = "dodgerblue",type="phong"))) |>
rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
[Package rayvertex version 0.11.4 Index]