View source: R/subdivide_mesh.R
subdivide_mesh | R Documentation |
Applies Loop subdivision to the scene (or selected meshes).
subdivide_mesh(
scene,
id = NA,
subdivision_levels = 2,
simple = FALSE,
normals = TRUE,
verbose = FALSE
)
scene |
The scene to subdivide. |
id |
Default |
subdivision_levels |
Default |
simple |
Default |
normals |
Default |
verbose |
Default |
Scene with shape added.
if(run_documentation()) {
#Subdivide the included R mesh
obj_mesh(r_obj(),position=c(-0.5,0,0)) |>
add_shape(subdivide_mesh(obj_mesh(r_obj(),position=c(0.5,0,0)),
subdivision_levels = 2)) |>
rasterize_scene(light_info = directional_light(direction=c(0.2,0.5,1)),fov=13)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.