if (FALSE) { # interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")
#Generate a sphere in the cornell box.
generate_cornell() |>
add_object(sphere(x = 555/2, y = 555/2, z = 555/2, radius = 100)) |>
render_scene(lookfrom = c(278, 278, -800) ,lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 16, clamp_value = 5)
#Generate a gold sphere in the cornell box
generate_cornell() |>
add_object(sphere(x = 555/2, y = 100, z = 555/2, radius = 100,
material = microfacet(color = "gold"))) |>
render_scene(lookfrom = c(278, 278, -800) ,lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 16, clamp_value = 5)
}
Run the code above in your browser using DataLab