Light Material

light(
color = "#ffffff",
intensity = 10,
importance_sample = TRUE,
image_texture = NA,
image_repeat = 1,
spotlight_focus = NA,
spotlight_width = 30,
spotlight_start_falloff = 15
)

## Arguments

color Default white. The color of the light Can be either a hexadecimal code, R color string, or a numeric rgb vector listing three intensities between 0 and 1. Default NA. If a positive value, this will turn this object into a light emitting the value specified in color (ignoring other properties). Higher values will produce a brighter light. Default TRUE. Keeping this on for lights improves the convergence of the rendering algorithm, in most cases. If the object is particularly important in contributing to the light paths in the image (e.g. light sources, refracting glass ball with caustics, metal objects concentrating light), this will help with the convergence of the image. Default NA. A 3-layer RGB array or filename to be used as the texture on the surface of the object. Default 1. Number of times to repeat the image across the surface. u and v repeat amount can be set independently if user passes in a length-2 vector. Default NA, no spotlight. Otherwise, a length-3 numeric vector specifying the x/y/z coordinates that the spotlight should be focused on. Only works for spheres and rectangles. Default 30. Angular width of the spotlight. Default 15. Angle at which the light starts fading in intensity.

## Value

Single row of a tibble describing the diffuse material.

## Examples

#Generate the cornell box without a light and add a single white sphere to the center
scene = generate_cornell(light=FALSE) %>%