I changed my mind.
I will draw a shadow behind the object, since this is relative easy. the coordinates of the shadow points are :
If the light spot is before the object at distance 1 at the left bottom, the plan of the shadow is behind the object at distance 1, the shadow will be twice so high than the object, and :
Shadow coordinates for a point(x, y) = X, Y are function of the distance to bottom * factor (=(distance plan/distance spot) * 2, or something alike)
One must remember however that the shadow will hold as much points as the object, NO MORE ! since the shadow is bigger than the object, it will contain holes... So if one would like to achieve a plain colored (screen 2 = black) shadow, this is more difficult imho.
L |