Lunar crescent simulation, version 04.04.2008
Martin Elsässer


To get a better understanding for the illumination of the lunar crescent at different elongations i have tried to simulate the appearance of a crescent, using the freely available raytracer, Persistence of Vision.

The moon

The moon was created as a sphere with bumps, which sits at a fixed position. The bumps were made proportionally higher than the mountains on the moon, with the height about 0.4% of the lunar diameter. The color of the lunar disk was deliberately not varied in this simulation, it is a uniform, flat white.
The variations in size and orientation of the true moon, which result from the elliptical orbit around the earth were not considered.

Lightsources: sun and earthshine

The moon is orbited by light-sources, taking the role of the sun. The "sun" consists of several individual lights, which span an apparent angle of half a degree, just as the real sun does as seen from the moon.
The earthshine was also simulated, to get a more realistic appearance of the whole lunar disk. (This is not really visible in the resulting, contrast enhanced images.)
The brightness of the sky around the disk was not considered. This would play an important role in being able to see the thin crescents. Also, the glare from the sun at small elongations was not considered.

The observer

The observer/camera also sits at a fixed location, observing the play of shadows on the moon, while the elongation of the sun changes. The moon spans an angle of half a degree, as seen from the observer.


The simulation-video shows the general decrease of brightness of the crescent, as well as the apparent shortening of the crescent. The difference in brightness between the crescent and the rest of the lunar disk, which is only illumiated by earthshine, steadily decreases. (The general brightness has been increased, to show the faint crescent.)
This Simulation Video (800kB) shows the change of the crescent at elongations between 0° and 10°.

Some images at different elongations. More of the crescent has been made visible, by increasing the contrast of the images. The numbers show the elongation in degrees.

Elongation: 3 degrees

Elongation: 4.2 degrees

Elongation: 5.1 degrees

Elongation: 6.1 degrees

Elongation: 7.1 degrees

Elongation: 8.1 degrees

Elongation: 10 degrees

Simulation source code

 * simulated crescent of the moon:
 * the "moon" is a sphere with a bumpy surface, half a degree across, at the center of the cs
 * it is illuminated by a "sun", (orbiting around it), which has a similar angular diameter.
 * the sun consists of several independent light-sources, to better emulate non-point light-source
 * the observer is at a given location and observes the shadow-play on the static moon
 * this model was chosen for simplicity

#version 3.5;

#include ""
#include ""
#include ""
#include ""

global_settings {
	assumed_gamma 1.5

// -------------------------------------------
#declare earthDist = 100;
#declare crescentTiltAngle = -90;

// the moon, a sphere with bumps
#declare moonRadius = tan(0.25*pi/180) * earthDist;

camera {
	location < 0, 0, - earthDist>
	look_at < moonRadius, 0, 0>
	angle 0.51 * 4/3 // width of the image in degrees
	rotate <0, 0, 90>

// animating the clock [0; 1] changes the phase from new-moon to half-moon
#declare elongation = clock * pi / 180;

// the sun, orbiting the moon

#declare sunDist = 1000;
#declare sunRadius = tan(0.5*pi/180) * sunDist;
#declare xCenterSun = sunDist*sin(elongation);
#declare zCenterSun = sunDist*cos(elongation);

light_source {  color White }

// more lights, to make the sun a more realistic glowing disk 
// the apparent size is also half a degree
light_source { < xCenterSun + sunRadius*sin(elongation+pi/2), 0, zCenterSun + sunRadius*cos(elongation+pi/2) > color White }
light_source { < xCenterSun-sin(elongation+pi/2), 0, zCenterSun - sunRadius * cos(elongation+pi/2) > color White }
light_source { < xCenterSun, sunRadius, zCenterSun > color White }
light_source { < xCenterSun, -sunRadius, zCenterSun > color White }

// the bigger the value, the smaller the bumps
#declare bumpFreq = 100;                

// the smaller the value, the lower the bumps
#declare bumpAmpl = 0.0035 * moonRadius; 
// just a scale-factor for visual brightness                        
#declare albedo = 0.35;

// simple model: scales with the fraction of illuminated earth visible 
#declare earthshine = 0.01 * (1+cos(elongation)); 

isosurface {

	function {
		f_sphere(x, y, z, moonRadius) + f_noise3d(bumpFreq*x, bumpFreq*y, bumpFreq*z)*bumpAmpl

	max_gradient 1.2
	accuracy 0.0001

	contained_by {sphere {<0,0,0>, moonRadius*(1 + 1.01*bumpAmpl)}}

	texture {
		pigment {color < albedo, albedo, albedo >}
		finish {
			ambient earthshine
			diffuse 1
	                specular 0
	                roughness 0
	                brilliance 1

	// these rotations just tilt some regular patterns of the bumps
	// other values could be used, to simulate libration
	rotate <0,0,45>
	rotate <0,45,0>

// call a macro to generate the elong-value numbers

back to Mondatlas main-page