# NOT RUN {
#Generate the ground and add some objects
scene = generate_ground(depth=-0.5,
material = diffuse(noise=1,noisecolor="blue",noisephase=10)) %>%
add_object(cube(x=0.7,material=diffuse(color="red"),angle=c(0,-15,0))) %>%
add_object(sphere(x=-0.7,radius=0.5,material=dielectric(color="white")))
# }
# NOT RUN {
render_scene(scene, parallel=TRUE,lookfrom=c(0,2,10))
# }
# NOT RUN {
# Make the sphere representing the ground larger and make it a checkered surface.
scene = generate_ground(depth=-0.5, spheresize=10000,
material = diffuse(checkercolor="grey50")) %>%
add_object(cube(x=0.7,material=diffuse(color="red"),angle=c(0,-15,0))) %>%
add_object(sphere(x=-0.7,radius=0.5,material=dielectric(color="white")))
# }
# NOT RUN {
render_scene(scene, parallel=TRUE,lookfrom=c(0,1,10))
# }
Run the code above in your browser using DataLab