if (FALSE) { # interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")
#Generate the ground and add some objects
scene = generate_studio(depth=-1, material = diffuse(color="white")) |>
add_object(obj_model(r_obj(),y=-0.5,x=0.5, scale=1.2,
material=glossy(color="darkred"),angle=c(0,20,0))) |>
add_object(sphere(x=-0.5,radius=0.5,material=dielectric())) |>
add_object(sphere(y=3,x=-2,z=-20,material=light(intensity=600)))
render_scene(scene, parallel = TRUE, lookfrom = c(0,2,-10), lookat=c(0,-0.25,0),
fov = 14, clamp_value = 10, samples = 16)
#Zooming out to show the full default scene
render_scene(scene, parallel=TRUE,lookfrom=c(0,200,-400),clamp_value=10,samples=16)
}
Run the code above in your browser using DataLab