This is part of the 'Solar Study Hackathon' effort
Locates the center point of every 3D face in the gbXML file that has been drawn and runs a raycaster in the vector direction of the Sun.
If one or more intersections are found the surface is deemed to be in shade
Draws vectors at the centers of 3D Faces
Draws vectors indicating the direction of the Sun
GbXML files may be loaded via a URL or by using the standard file dialog box
The ground plane is now set at lowest point of all 'exposedToSun; surfaces
As the gbXML file is being loaded any surface that is not 'exposedToSun' is discarded. This shortens and simplifies calculations
A ground plane with 100 x 100 vertices is added to a gbXML file
Rays are cast from every vertex in the vector direction of the Sun. If one or more intersects are found the ground plane vertex is deemed to be in the shade.
The code for generating this visualization is surprisingly short and simple. It should fairly easy for people familiar with Three.js to add new features. It also runs reasonably fast and yet there are likely to be a number of opportunities to optimize the code. Thus it looks like handling larger models and producing results with finer resolution should all be quite doable.
@ladybug-tools/spiders
full screen: Sun Range gbXML 3
Read Me & source code
This is part of the 'Solar Study Hackathon' effort
The code for generating this visualization is surprisingly short and simple. It should fairly easy for people familiar with Three.js to add new features. It also runs reasonably fast and yet there are likely to be a number of opportunities to optimize the code. Thus it looks like handling larger models and producing results with finer resolution should all be quite doable.