# Rendering : Light Intensity Profile

*Created on December 18, 2022. Last update on December 24, 2022.*

## TL;DR

Here is the viewer for common Three.js shapes. Here is the viewer for polyhedron shapes.

## Details

The world of lighting characterizes luminaires by their intensity profile, a spherical function of the quantity of light emitted into a particular direction. It is usually expressed in candela (for the photometric part) or in Watt per steradians (for the radiometric part). Of course, the intensity profile depends on the object shape and on the luminance distribution across the shape's surface. To simplify the problem, let's consider that the luminance is constant. Then, the intensity is proportional to the shape apparent area which is "easy" to compute when the shape is convex. In real life though, the luminance of an emitting object is never constant and the shape of objects is not convex most of the time. Please do not mix up intensity with luminance, the latter being constant means that a small element still looks equally bright whatever the direction you are looking at but the intensity take into account the orientation and area of the surface.

For a flat surface (like a light panel), the apparent area at an angle theta from the surface normal is the cosine of this angle times the area of the surface. Consequently, the light intensity reaches its maximum in front of the panel and decreases towards zero when tilting the surface. By summing the apparent surface of all faces of a triangular mesh, you get the total apparent surface. This computation depends on the viewing direction so it has to be repeated for every direction at which the intensity is to be evaluated. This is what is done in this viewer for shapes that ends up with "Mesh", for the rest, there exist analytical solutions.

With this viewer, I could experiment with messing with the GUI elements and displaying spherical functions. At first, I wanted to display the spherical harmonics but this was a more original project.

## Side notes due to edits

I have managed to load meshes data from OBJ files and consequently compute the intensity distribution of all of the convex polyhedra with regular faces.

The light intensity profile of the cone seems to have more symmetries that the cone itself. I have not figured the exact math out but it seems strongly so. This may be true for other shapes as well.

I would like to have a rendering of these lights in a room. I'll have to write some shaders for that and I am not motivated enough for that now.