cone_mesh {rayvertex} | R Documentation |
Cone 3D Model
Description
Cone 3D Model
Usage
cone_mesh(
start = c(0, 0, 0),
end = c(0, 1, 0),
radius = 0.5,
direction = NA,
from_center = FALSE,
material = material_list()
)
Arguments
start |
Default |
end |
Default |
radius |
Default |
direction |
Default |
from_center |
Default |
material |
Default |
Value
List describing the mesh.
Examples
if(run_documentation()) {
#Generate a cone
generate_cornell_mesh() |>
add_shape(cone_mesh(start = c(555/2, 20, 555/2), end = c(555/2, 300, 555/2),
radius = 100)) |>
rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
if(run_documentation()) {
#Generate a blue cone with a wide base
generate_cornell_mesh() |>
add_shape(cone_mesh(start = c(555/2, 20, 555/2), end = c(555/2, 300, 555/2), radius=200,
material = material_list(diffuse="dodgerblue"))) |>
rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
if(run_documentation()) {
#Generate a long, thin cone
generate_cornell_mesh() |>
add_shape(cone_mesh(start = c(555/2, 20, 555/2), end = c(555/2, 400, 555/2), radius=50,
material = material_list(diffuse="dodgerblue"))) |>
rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
[Package rayvertex version 0.11.4 Index]