1. Ok, so... I want to make a line come from the top of the screen down. I know the angle from which that line will come and the length of the line. I've pictured it as my line being the hypothenuse on a right triangle. If I know the hyphotenuse length and the angle theta and let's say... the (x,y) position of the bottom end of the hypothenuse, how can I determine the (x,y) position of the top end of the hypothenuse in order for the line to maintain the angle theta? And after I know the (x,y) position of the top end and drew my line, I would like to know the formula that changes the (x,y) position of both bottom end and top end at the same time, in order for the line to go all the way down while maintaining the angle theta. Picture it as a solar ray coming down.
2. After that solar ray comes down and hits an obstacle, it reflects right? Changing the angle in which it goes. I would like to know the formulas that calculate the new angle of the ray when it comes in contact with the surface of a sphere, a rect and a parabole.
Thank you,
Andrei
1