# NOT RUN {
#Generate a cube in the cornell box.
# }
# NOT RUN {
generate_cornell() %>%
add_object(cube(x = 555/2, y = 100, z = 555/2,
xwidth = 200, ywidth = 200, zwidth = 200, angle = c(0, 30, 0))) %>%
render_scene(lookfrom = c(278, 278, -800) ,lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 500, parallel = TRUE, clamp_value = 5)
# }
# NOT RUN {
#Generate a gold cube in the cornell box
# }
# NOT RUN {
generate_cornell() %>%
add_object(cube(x = 555/2, y = 100, z = 555/2,
xwidth = 200, ywidth = 200, zwidth = 200, angle = c(0, 30, 0),
material = metal(color = "gold", fuzz = 0.2))) %>%
render_scene(lookfrom = c(278, 278, -800) ,lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 500, parallel = TRUE, clamp_value = 5)
# }
# NOT RUN {
#Generate a rotateddielectric box in the cornell box
# }
# NOT RUN {
generate_cornell() %>%
add_object(cube(x = 555/2, y = 200, z = 555/2,
xwidth = 200, ywidth = 100, zwidth = 200, angle = c(30, 30, 30),
material = dielectric())) %>%
render_scene(lookfrom = c(278, 278, -800) ,lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 500, parallel = TRUE, clamp_value = 5)
# }
Run the code above in your browser using DataLab