add_shape {rayvertex} | R Documentation |
Add Shape
Description
Add shape to the scene.
Usage
add_shape(scene, shape = NULL)
Arguments
scene |
The scene to add the shape. |
shape |
The mesh to add to the scene. |
Value
Scene with shape added.
Examples
if(run_documentation()) {
#Generate several spheres in the cornell box
scene = generate_cornell_mesh()
set.seed(1)
for(i in 1:30) {
col = hsv(runif(1))
scene = add_shape(scene, sphere_mesh(position=runif(3)*400+155/2,
material=material_list(diffuse=col, type="phong",
ambient=col,ambient_intensity=0.2),
radius=30))
}
rasterize_scene(scene, light_info=directional_light(direction=c(0.1,0.6,-1)))
}
[Package rayvertex version 0.11.4 Index]