if (FALSE) { # interactive() || isTRUE(as.logical(Sys.getenv("IN_PKGDOWN")))
m = sphere_mesh(radius = 0.5)
pos = c(-1,0,0) # place Moon on the left
look = c(0,0,0) # look toward the origin (e.g., Earth/camera)
up = c(0,1,0)
M = lookat_transform(pos = pos, look = look, up = up)
m |>
transform_mesh(M) |>
translate_mesh(pos) |>
rasterize_scene(lookfrom = c(0,0,0), lookat = pos,
light_info = directional_light(direction = c(1,0,0)))
}
Run the code above in your browser using DataLab