View source: R/transform_mesh_functions.R
center_mesh | R Documentation |
Centers the mesh at the origin.
center_mesh(mesh)
mesh |
The mesh object. |
Centered mesh
if(run_documentation()) {
#Center the Cornell box and the R OBJ at the origin
center_mesh(generate_cornell_mesh()) |>
add_shape(center_mesh(obj_mesh(r_obj(),scale=100,angle=c(0,180,0)))) |>
rasterize_scene(lookfrom=c(0,0,-1100),fov=40,lookat=c(0,0,0),
light_info = directional_light(c(0.4,0.4,-1)) |>
add_light(point_light(c(0,450,0), falloff_quad = 0.0, constant = 0.0002, falloff = 0.005)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.