YZ Rectangle 3D Model
Default c(0,0,0)
. Position of the mesh.
Default c(1,1,1)
. Scale of the mesh. Can also be a single numeric value scaling all axes uniformly.
Default c(0,0,0)
. Angle to rotate the mesh.
Default c(0,0,0)
. Point around which to rotate the mesh.
Default c(1,2,3)
. Order to rotate the axes.
Default material_list()
(default values). Specify the material of the object.
List describing the mesh.
if(run_documentation()) {
generate_cornell_mesh() |>
add_shape(yz_rect_mesh(position = c(555/2, 100, 555/2), scale=c(200,1,200), angle=c(0,0,0),
material = material_list(diffuse = "purple"))) |>
rasterize_scene(light_info = directional_light(c(0,0.5,-1)))
}
#> Setting default values for Cornell box: lookfrom `c(278,278,-800)` lookat `c(278,278,0)` fov `40` .
if(run_documentation()) {
#Rotate and scale
generate_cornell_mesh() |>
add_shape(yz_rect_mesh(position = c(555/2, 100, 555/2), scale=c(300,1,200), angle=c(0,45,0),
material = material_list(diffuse = "purple"))) |>
rasterize_scene(light_info = directional_light(c(0,0.5,-1)))
}
#> Setting default values for Cornell box: lookfrom `c(278,278,-800)` lookat `c(278,278,0)` fov `40` .