Calculation method
Illuminance at a point is split into two physically distinct parts, computed by different means and then added. Keeping them separate is what makes the result inspectable: you can see how much of the light is arriving straight from the luminaires and how much is bouncing off the room.
Coordinate conventions
- X runs along the room length, Y along the width, Z up from the floor. The origin is a floor corner.
- Photometry is Type C: the vertical angle gamma is measured from nadir, so 0 degrees is straight down
and 90 degrees is horizontal. The azimuth C is measured around the downward axis from the luminaire's local +X direction.
- A luminaire's orientation is applied as R = Rz(azimuth) · Rx(tilt) · Rz(spin). With all three at
zero, the photometric nadir points straight down and the C0 plane runs along world +X.
- The room's "north azimuth" is the compass bearing of the +Y axis, which is what turns geometric wall
labels into real orientations for the daylight model.
Direct component
For a point P on a surface with unit normal N, each luminaire contributes
E = I(gamma, C) * cos(theta) / r^2
where I(gamma, C) is read from the intensity distribution in the direction from the luminaire to P, r is the distance, and theta is the angle of incidence at P. This is the inverse square law and the cosine law applied together. Contributions from every luminaire are summed, so overlapping beams add exactly with no approximation.
The direction is transformed into the luminaire's local frame by the inverse of its rotation matrix, then bilinearly interpolated in the photometric table. Values outside the tabulated vertical range are zero: a downlight whose table stops at 90 degrees genuinely emits nothing above horizontal, and padding the table with zeros up to 180 degrees would invent a spurious ramp past the cut-off.
Cylindrical illuminance
The mean illuminance on a small vertical cylinder at a point follows from projecting the cylinder onto the incoming ray. For a source at elevation epsilon above the horizontal through the point:
E_cyl = I * cos(epsilon) / (pi * r^2)
which is the intercepted flux divided by the cylinder's total side area. Vertical illuminance on a plane facing a given direction uses the same direct formula with N set to that direction.
Interreflected component
The six room faces are subdivided into planar patches. For each patch i, the reflected exitance M satisfies
M_i = rho_i * ( Edir_i + sum_j F_ij * M_j )
where Edir_i is the directly received illuminance, rho_i the reflectance and F_ij the form factor from patch i to patch j. The system is diagonally dominant for reflectance below 1, so Gauss-Seidel iteration converges geometrically; the solver runs to a relative residual of 1e-6, which typically takes about ten iterations.
Once solved, the interreflected illuminance anywhere in the room is
Eind(P, N) = sum_j M_j * F_(dA at P -> patch j)
Configuration factors
Both the patch-to-patch form factors and the point-to-patch factors come from closed-form results rather than sampling. Two canonical cases are combined by signed superposition:
Parallel planes, element projecting onto the rectangle's corner:
g(a,b,d) = 1/(2pi) [ a/sqrt(a^2+d^2) * atan( b/sqrt(a^2+d^2) )
+ b/sqrt(b^2+d^2) * atan( a/sqrt(b^2+d^2) ) ]
Perpendicular planes, one rectangle edge lying in the element's plane:
h(a,b,d) = 1/(2pi) [ atan(a/d) - d/sqrt(b^2+d^2) * atan( a/sqrt(b^2+d^2) ) ]
Superposition across the rectangle bounds handles any position. For the perpendicular case the extent along the element normal is clamped to the half-space the element can actually see, because a surface cannot receive light from behind itself.
Surface-to-surface factors integrate the exact point-to-rectangle result over the source patch with three-point Gauss-Legendre quadrature, then reciprocity fills the transpose and the rows are normalised so they sum to one. Row normalisation is deliberate: in a closed enclosure the factors from any patch must sum to unity, and enforcing that makes the solve conserve flux exactly despite quadrature error.
The test suite asserts that the factors from an interior point to all six faces of a box sum to
1.00000000, that surface-to-surface values match the published closed forms to six significant
figures, and that reciprocity holds. See Validation.
Walls are subdivided vertically
Every wall gets at least three bands in the vertical direction. A wall lit from a ceiling array has a strong top-to-bottom luminance gradient; collapsing it to one patch would flatten the interreflected field and distort the glare background luminance.
Maintained and initial values
The engine computes initial illuminance, that is a new and clean installation. Maintained illuminance is the initial value multiplied by the maintenance factor. Because the radiosity system is linear, scaling all sources scales the whole solution, so both are available from one solve.
Standards state their illuminance requirements as maintained values, so compliance is always assessed against the maintained figures.
Task area
The task area is the room less a boundary band, 0.5 m by default, which is what EN 12464-1 excludes. A grid point stands for its whole cell, so it counts toward the task area only when the entire cell clears the band. Masking on the point centre alone would let cells straddling the band inflate the task-area minimum.
Uniformity ratios are computed over the task area only:
- Uo, overall uniformity, is Emin divided by Eavg
- Ud, diversity, is Emin divided by Emax
Measurement grid
In EN 12464-1 mode the maximum grid spacing comes from the longer dimension d of the calculation area:
p = 0.2 * 5^(log10 d) equivalently p = 0.2 * d^0.69897
The point count is rounded up so the real spacing never exceeds p, and cells are kept within a 0.5 to 2 aspect ratio. Points sit at cell centres, which is what the standard requires and which also avoids sampling exactly underneath a luminaire where the field is at its peak.
Lumen method cross-check
The average illuminance is also derived by a completely independent route, and the two are compared.
Each luminaire's distribution is integrated over solid angle:
dPhi = I(gamma, C) * sin(gamma) * dgamma * dC
Every zone is traced along its centre direction to the box face it exits through, and separately tested for a downward crossing of the working plane. Because the integration covers the full sphere, the surface totals sum to the emitted flux, making this an exact flux accounting. The utilance is then the share of emitted flux that reaches the working plane, direct plus interreflected, and
E_avg = N * Phi_luminaire * utilance * LLF / A
This shares no numerical machinery with the point-by-point grid, so agreement between them is a real check rather than a restatement. On the tutorial projects the two routes agree to within half a per cent. A deviation above eight per cent raises a warning, because it usually means the grid is too coarse for the beam spacing or a luminaire has been placed outside the room outline.
Utilance versus coefficient of utilisation
Utilance is referenced to luminaire flux. The classical IES coefficient of utilisation is referenced to bare lamp flux, so it additionally carries the luminaire light output ratio:
CU = utilance x LOR
LOR is only knowable when the photometric file declares its lamp lumens, which relative photometry does and absolute photometry does not. Both figures are reported, clearly labelled. Compare published CU tables against cu_vs_lamp_lumens, never against utilance, or the design will look far better than it is.
Cavity ratios and effective cavity reflectances are reported alongside, computed as
RCR = 5 * h * (L + W) / (L * W)
rho_eff = rho_bar * A0 / ( As - rho_bar * (As - A0) )
where A0 is the cavity opening area and As the area of the real cavity surfaces, excluding the opening. With a flush-mounted luminaire the ceiling cavity has zero depth and the formula correctly returns the ceiling reflectance unchanged.
Glare
UGR follows CIE 117 and EN 12464-1:
UGR = 8 log10 [ (0.25 / Lb) * sum( L^2 * omega / p^2 ) ]
Because L = I / Aproj and omega = Aproj / r^2, the summation term reduces to I^2 / (Aproj * r^2), so only the projected luminous area is needed. The background luminance Lb comes from the interreflected illuminance on a vertical plane at the eye, divided by pi; direct light from the luminaires is excluded, which is what the definition requires.
The position index p uses Guth's index through Levin's closed-form fit, with sigma the angular displacement of the source from the line of sight and alpha the rotation about the line of sight measured from straight up. Only luminaires in the forward hemisphere and at or above eye level enter the summation.
UGR is swept over a grid of observer positions and the four cardinal viewing directions, and the worst case is reported. A single position would understate the glare a real occupant experiences.
Irregular plans
For a polygonal plan, the direct component is exact for the real outline: grid points are generated only inside the polygon and the point-by-point summation does not care about shape. The interreflected component uses the bounding rectangle of the plan, which is noted in the results, and is slightly optimistic near re-entrant corners.
Numerical quality is reported, not hidden
Every calculation reports:
- the number of enclosure patches and the iteration count and residual of the interreflection solve
- direct flux closure, the received flux as a percentage of emitted flux, where 100 per cent is exact
- absorption closure, which must also be 100 per cent in a closed room
- the deviation between the lumen method and the grid average
- the runtime
Patch-centre sampling of the direct term leaves a closure error of a few tenths of a per cent. It is printed rather than suppressed so you can judge it.
Performance
Form factors depend only on geometry, so the matrix is memoised on disk and reused while you change reflectances, dimming or fixture selection. A typical office recalculates in around 120 ms including daylight and energy; the first run in a new geometry adds the matrix build.
Dense grids evaluate the interreflected component on a coarse lattice and interpolate, because that field is smooth. The direct component is always evaluated at every grid point, since that is where the detail lives.