Rain Shadow

Originally my plan was to combine the wind speed and wind direction maps to form vectors where the wind speed was the magnitude and the wind direction was the angle and then trace those over the elevation to create the rain shadow. The results were not very good so I discarded the wind speed maps (I wasn't too sure about their accuracy anyways) and am now using a constant vector magnitude instead. Here is a description of the process:
  • Initialize a 2d array to 1.0 to serve as our rain source.
  • Repeat the following for the number of iterations:
    • For each cell do the following:
      • If the rain source is 0.0 continue to the next cell, otherwise:
      • Project a series of rays to form a circular arc. Rays are projected from wind direction angle - PI/8 -> wind direction angle + PI/8.
      • Each ray is drawn using Bresenham's line algorithm.
      • As the ray is projected the value being added to the resulting map is decayed by a set percentage.
      • As the ray is projected the elevation is evaluated, the ray continues to trace until it reaches the end or it climbs past the elevation threshold and reaches a local maximum.
    • Take the resulting map and any points that are below a threshold set the corresponding point in the rain source to 0.0.
Next I need to create the rain fall maps and combine them with the rain shadow to get the final rain maps. Legend
  • Black = Rain Shadowed
  • White = Normal

Leave a Reply