I am working on software (Ruby - Sketchup) to calculate the radiation (sun, sky and surrounding buildings) as part of urban development at the pedestrian level. The ultimate goal is to create a contour map showing the level of total radiation. With full radiation, I mean short-wave (light) and long-wave (heat). (To give you an idea: http://www.iaacblog.com/maa2011-2012-digitaltools/files/2012/01/Insolation-Analysis-All-Year.jpg )

I know that there are several existing programs that do this, but I need to write my own, because this calculation is only part of a more complex workflow.
The (obvious) pseudo code is as follows:
Select and mesh surface for analysis
From each point of the mesh
Cast n (see below) rays in the upper hemisphere (precalculated)
For each ray check whether it is in shade
If in shade => Extract properties from intersected surface
If not in shade => Flag it
loop
loop
loop
- , , . (Dx, Dy, Dazimth, Dtilt). , , , Montecarlo .
, skydome. .
, , . skydome. , . , .
, , , , . : , skydome .
, . - .
?
n
; . (, Tregenza), .
: Spektre
. . epw. , , , ( ). , ( ) . . .
. , . . 1
? , , . .
? . . , , , .
? . Skethcup , : , .. ( , ), , , .
. , . , . 100mx100m 2000mx2000m. 2 . - . : , , .
Framerate. . VTK Paraview :-)
. . . . 4. . . , , . , .
https://www.lucidchart.com/documents/view/5ca88b92-9a21-40a8-aa3a-0ff7a5968142/0