3
$\begingroup$

is it possible to calculate shadow areas of buildings or simulate shadows of buildings in a city, using the heights of these buildings and the sun angle and azimuth? the basic light tracing concept using trigonometry is known. But the Problem is how to find away to come up with simulated shadow of group of buildings in one place.

2 Answers 2

4

I'll assume that the buildings are made up of polygons.

  1. Project each polygon onto the ground to find its shadow.
  2. Merge these shadow polygons (e.g. using Weiler-Atherton).
  3. Find the area of the merged polygon.
  • 0
    You can use gpc for merging the polygons. See http://www.cs.man.ac.uk/~toby/alan/software/2010-11-10
-1

if you have the data on the buildings, model the whole scene as tall boxes in OpenGL, render it with a suitable light source, see the shadow.

  • 0
    This answer does not really enlighten anyone as to how the shadows are actually calculated. Its like saying "The reason the derivative of x^2 is 2x is because mathematica told me so."2010-11-10
  • 0
    I did not read the question as a search for enlightenment. He just wanted a way to find the shadow.2010-11-10