A shadow is the part of a surface that cannot see the light. A point source gives a sharp edge. A lamp of diameter D is a whole disc of point sources: a table point sees only a fraction V of the disc. Where V = 0 you are in the umbra, where 0 < V < 1 in the penumbra, where V = 1 fully lit.
Similar triangles give the width of the soft edge: P = D · dOR / dLO, with dLO the lamp-to-object-edge distance and dOR the object-edge-to-table distance. Make the lamp bigger or the object higher above the table and the edge gets softer; bring the lamp close and the shadow also grows.
For a ball of radius R lit by a disc of radius Rs > R at distance d the umbra ends R d / (Rs − R) behind the ball's centre: the same formula says the Moon's umbra is about 374,000 km long, just reaching the Earth at 384,400 km (hence total eclipses are rare and narrow). If the lamp is smaller than the ball the shadow never closes.
The table colour is computed per pixel in the GPU by sampling the lamp disc (40 samples, rotated per pixel) and testing each ray against the ball, the cube and the cylinder analytically; light received also falls with cosθ/d². The probe uses the same test on the CPU with 400 samples.
Simplifications: opaque objects, shadows only on the table (objects do not shadow each other), no inter-reflection or diffraction, uniformly bright lamp discs. The table, ruler, lamps and objects were modelled in Blender; the table print was baked there.