This isn't actually homework, it's for a solar funnel I'm building. I can workout the angles by drawing scale models, but I'd like to know the formula so I use it in a program.

So the problem, the idea is to have the widest funnel possible, but not so wide that sun hitting the top of the funnel hits the other side of the funnel, it should enter the oven. x and y are known, I would love a formula to work out theta.