I originally considered computing cast shadow patterns based on DEM obtained
from SRTM. Since all my datasets were in non-projected WGS84 reference
coordinates, I applied r.sunmask to the DEM datasets. I observed that the
resulting cast shadow exhibited a pattern apparently independent on sun
elevation, an unexpected result requiring more investigation to understand.
Back to basics, I created a very basic elevation model (different headers
for projected -- WGS84/UTM31N or
non-projected -- WGS84 frameworks when loading in GRASS) using GNU/Octave in
which a trapezoidal mountain is located in a flat plain at elevation 0 (less
beautiful than the gaussian volcano of the
R.sun tutorial but easier to
generate). Notice that the 0-elevation baseline requires to NOT ignore this altitude
in the r.sunmask processing.
Performing the same experiment (cast shadow calculation) using this basic
dataset, I indeed confirmed that the shadow length was independent on
sun elevation when using an unprojected reference framework.
Left (click on image for a full resolution version): Digital Elevation Model -- Right: unprojected framwork for various
sun elevations: the cast shadow length is independent on sun elevation (45 and
80 degree elevations) !
Based on this analysis, I considered using a projected framework, namely
WGS84/UTM31N (instead of the basic unprojected WGS84, since I am interested
in analyzed time-lapse pictures grabbed in the French Alps). Before
investigating the real (and computationaly intensive) DEM from the Alps (as
provided by the SRTM), I used the basic model on a projected framework to
indeed verify that the cast shadow is dependent on sun elevation in r.sunmask.
Thess images were obtained by varying the elevation for each new azimuth of
the sun position (from 20 to 45 degrees for azimuth from 225 to 45 degs).
Based on these results, it was concluded that a projected reference framework
was needed: for France, WGS84/UTM31N. After loading the WGS84-referenced
SRTM DEM in QGis, the file was saved in a new projected framework WGS84/UTM31N
before being loaded into GRASS in a map which is referenced to WGS84/UTM31N.
Once this is done, the dataset is restricted to the GRASS region using
r.resample (don't forget to overload the projection reference when processing
the file). The result is as follows, including a geometrically corrected picture
from the webcam located at Aiguille du Midi (Mont Blanc area near Chamonix,
France).
Once the restricted DEM is selected various configurations of sun position are
considered to compute the cast shadow. Most significantly, one picture attracted
our attention (Sept. 22 2013 at 13h05 local time) in exhibiting the cast shadow
of two mountains.
These results are well visible in the following cast shadow calculations. Notice
that the image properties are displayed since using these cast shadow masks
is not obvious at first sight: I select a transparency mask based on the
calculation result (NaN generates 100% transparency) and a background color
with a transparency of 65% in order to observe the background image.
First the cast shadow map on a slope map:

and the shadow map displayed over a backgroud image geometrically corrected
to match the topography:
Above is the computation for an elevation of 44.2 degrees and an azimuth of 174.7 degrees as provided on the
USNO web site for the sun position at the time
the picture was taken by the webcam (13/09/22 at 1305). The cast shadow
of the mountain is well visible over the glacier, although a detailed analysis
beyond the visual comparison has not been performed yet.