Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Modeling (relative) Sub-Canopy Biophysical Variables with PovRay

Posted by smathermather on January 9, 2010

One of my goals in modeling canopy height is to estimate sub-canopy biophysical variables that give indications of habitat suitability.  For example, suppose we have a rare plant that is canopy gap dependent.  How do we model it’s distribution?  With a statewide LiDAR dataset from which we can derive canopy location and height, we can identify canopy gaps.  While I haven’t gotten to the modeling phase yet, my maps of canopy boundaries have been really neat to field verify– it is possible for me to identify where I am in the forest by looking at at the size and shape of the canopy gap I am near, relative to other features, such as streams and topography.

Another use of this facility is to model urban farming opportunities– sunlight (site aspect and shading) and water being the two primary driving factors for choosing urban agriculture locations (soil and/or soil ammendments are typically hauled in if the soil is inadequate).

PovRay isn’t the best tool for doing this analysis (we can only model relative shadowing, not absolute physical solar incidence), but a Swiss Army knife isn’t the best bottle opener either.  I’ve got one of each in my pocket, so I use them.  PovRay does have a sun position model controlled by latitude, year, time of year, day, hour, etc.

Shadow length at 12:34 every day for a year:

#include "sunpos.inc"

global_settings {assumed_gamma 1}

camera {
 location  <3.0, 5.0, -5.0>
 look_at   <0.40, 1.8, 0.0>
 angle 40
}

#declare Year= 1998;
#declare Month= 1;
#declare Day= 1;
#declare Hour= 12;
#declare Minute= 34;
#declare Lstm= 15;
#declare LONG= 6.9;
#declare LAT=42;

#declare LastIndex = 365;

#declare Index = 1;
#while(Index <= LastIndex)

 //Put in the suns
 light_source {
 SunPos(Year, Month, Day, Hour*LastIndex, Minute, Lstm, LAT, LONG)
 rgb 1/LastIndex
 }

#declare Index = Index + 1;
#end

background {rgb 0}
#include "Linden.inc"
 object { TREE
 scale 4
 }
plane {
 <0, 20.0, 0.0>, 0.0
 material {
 texture {
 pigment {
 rgb <0.700023, 0.700023, 0.700023>
 }
 normal {
 brick 0.1 //amount
 }
 finish {
 diffuse 0.6
 brilliance 1.0
 }
 }
 interior {
 ior 1.3
 }
 }
}

12:34, January 1st:

And the same tree and shadow, 179 days later:

And the summation of all shadows from above:

#include "sunpos.inc"

global_settings {assumed_gamma 1}

camera {
 orthographic
 location  <0, 5.0, -2>
 look_at   <0.40, 1.8, 0.0>
 angle 80
}

#declare Year= 1998;
#declare Month= 1;
#declare Day= 1;
#declare Hour= 12;
#declare Minute= 34;
#declare Lstm= 15;
#declare LONG= 6.9;
#declare LAT=42;

#declare LastIndex = 365;

#declare Index = 1;
#while(Index <= LastIndex)

 //Put in the suns
 light_source {
 SunPos(Year, Month, Day, Hour*LastIndex, Minute, Lstm, LAT, LONG)
 rgb 1/LastIndex
 }

#declare Index = Index + 1;
#end

background {rgb 0}

#include "Linden.inc"
 object { TREE
 scale 4
 no_image
 }

plane {
 <0, 20.0, 0.0>, 0.0
 material {
 texture {
 pigment {
 rgb <.7,.7,.7>
 }
 normal {
 brick 0.1 //amount
 }
 finish {
 diffuse 0.6
 brilliance 1.0
 }
 }
 interior {
 ior 1.3
 }
 }
}

One Response to “Modeling (relative) Sub-Canopy Biophysical Variables with PovRay”

  1. […] Modeling (relative) Sub-Canopy Biophysical Variables with PovRay January 2010 Leave a Comment LikeBe the first to like this post. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: