# NOT RUN {
#Generate a disk in the cornell box.
# }
# NOT RUN {
generate_cornell() %>%
add_object(disk(x = 555/2, y = 50, z = 555/2, radius = 150,
material = diffuse(color = "orange"))) %>%
render_scene(lookfrom = c(278, 278, -800) ,lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 400, parallel = TRUE, clamp_value = 5)
# }
# NOT RUN {
#Rotate the disk.
# }
# NOT RUN {
generate_cornell() %>%
add_object(disk(x = 555/2, y = 555/2, z = 555/2, radius = 150, angle = c(45, 0, 0),
material = diffuse(color = "orange"))) %>%
render_scene(lookfrom = c(278, 278, -800) , lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 400, parallel = TRUE, clamp_value = 5)
# }
# NOT RUN {
#Pass a value for the inner radius.
# }
# NOT RUN {
generate_cornell() %>%
add_object(disk(x = 555/2, y = 555/2, z = 555/2,
radius = 150, inner_radius = 75, angle = c(45, 0, 0),
material = diffuse(color = "orange"))) %>%
render_scene(lookfrom = c(278, 278, -800) ,lookat = c(278, 278, 0), fov = 40,
ambient_light = FALSE, samples = 400, parallel = TRUE, clamp_value = 5)
# }
Run the code above in your browser using DataLab