Click or drag to resize
DigitalRuneEphemerisGetMoonlight Method
Computes the moonlight intensity.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static void GetMoonlight(
	float altitude,
	float turbidity,
	Vector3D moonPosition,
	float phaseAngle,
	out Vector3F directMoonlight,
	out Vector3F scatteredMoonlight
)

Parameters

altitude
Type: SystemSingle
The altitude (elevation) of the observer's position in meters above the mean sea level.
turbidity
Type: SystemSingle
The turbidity, which measures how polluted the air is. The values should be in the range [1.8, 20]. A turbidity of 2 describes a clear day whereas a turbidity of 20 represents thick haze. A commonly used value is 2.2.
moonPosition
Type: DigitalRune.Mathematics.AlgebraVector3D
The moon position in world space.
phaseAngle
Type: SystemSingle
The moon phase angle in radians in the range [0, 2π]. A new moon has a phase angle of 0. A full moon has a phase angle of π.
directMoonlight
Type: DigitalRune.Mathematics.AlgebraVector3F
The direct moonlight illuminance in [lux].
scatteredMoonlight
Type: DigitalRune.Mathematics.AlgebraVector3F
The scattered moonlight illuminance (= ambient light, indirect light or "skylight" contribution of the moon) in [lux].
Remarks

The light values are computed for the earth using NASA data, experimental data and a physically-based model of the atmosphere.

All light values are computed for a cloudless sky. When the sky is cloudy, reduce the direct light and increase the scattered/ambient light. Additionally you will want to increase the ambient light at night to model light pollution.

Thread-Safety: This method is not thread-safe, i.e. it must not be called simultaneously from multiple threads.

See Also