# NOT RUN {
#Generate an ellipsoid in a Cornell box
# }
# NOT RUN {
generate_cornell() %>%
add_object(ellipsoid(x = 555/2, y = 555/2, z = 555/2,
a = 100, b = 50, c = 50)) %>%
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 {
#Change the axes to make it taller rather than wide:
# }
# NOT RUN {
generate_cornell() %>%
add_object(ellipsoid(x = 555/2, y = 555/2, z = 555/2,
a = 100, b = 200, c = 100, material = metal())) %>%
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 {
#Rotate it and make it dielectric:
# }
# NOT RUN {
generate_cornell() %>%
add_object(ellipsoid(x = 555/2, y = 555/2, z = 555/2,
a = 100, b = 200, c = 100, angle = c(0, 0, 45),
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