Generating a 3D shape that cast same shadow under all sun directions

I’m thinking of a project where the aim to create a 3D shape that produces a specific target shadow (any closed curve) at the same location when exposed to sunlight from a variety of directions. Essentially, I want the resulting shape to ensure that its shadow matches the given closed curve for all the sun directions in a year-long sun path.

So i am starting with a desired shadow and trying to reconstruct the 3D shape that produces this shadow under multiple sunlight directions, like an an inverse problem in computational geometry

I’d like some advice on how you think this can be achieved. After staring in gh, i was sort of naive in its complexity, assuming it’s involved some projections onto the vector direction, some extrusions and some boolean operations …

Given it a second thought

  • Many shapes can produce the same shadow for a single sun direction (e.g., a cone or cylinder).
  • To handle all sun vectors, the solution must satisfy constraints across all directions simultaneously, which makes it challenging.
  • A shape can produce a correct shadow for one moment, but not for another
  • I assume the ‘challenge’ requires finding the envelope of all 3D solutions (inverse projections). This involves geometric intersections and unions.

Some ideas:

  • Use voxel-based modeling to backproject the shadow curve into a 3D voxel grid and iteratively refine the shape.
  • Use algorithms like marching cubes to generate the final shape.
    • Galapolos like tools and frame it as optimization problem, you can iteratively refine the 3D shape to minimize the difference between its shadow and the target shadow for all sun directions. But i think a faster more algorithmic apoach can be found