Calculate the size of the shadow from a cube onto another cube

570 Views Asked by At

There is a big cube with a light (point) exactly in the middle of it. Then there's also a small cube inside that big cube. My task is to calculate the surface of the shadow (sharp edges, no shadow algorithm) of the small cube onto the big cube. I know the sizes and positions of both cubes.

How do I solve this task? My idea is to create vectors from the light to all the corners of the small cube and then increase the length of each vector until it reaches one of the sides of the outer cube (point of intersection). Then I connect all these intersection points to a shape and try to somehow calculate the surface it creates.

But then again, I don't exactly know how I would do that. Does my Idea even make sense? Or is there a better way (pretty sure there is)?