I've been programming simple programs for quite a while now. I've been playing this game called Couronne, it's a cue stick based game like billiards. It's played on a perfectly square board although the camera angle makes it look like a trapezoid. You start by placing your ring on the back line of the board, click and drag to aim with the cue, then release to shoot the ring. Here's a screenshot of the game http://img706.imageshack.us/img706/6264/couronnei.png In that screen shot, it's the other player's turn. When it's my turn, I place the ring on the back red line to shoot.
I've been trying to write a program to draw a straight line from my cue stick to the opposite side of the board, reflect off of the back wall, and come back to my side of the board. So I know where exactly my ring will go after hitting the wall. The problem I'm facing is, I don't know the formula for the angle. It's a square board, but to the eye, it looks like a trapezoid because the camera angle. I was wondering if there's a way to figure out the angle of the camera? I was also wondering how I could figure out the angle for the line to reflect off of the back wall. I was also wondering if the angle would have to change the further from the center of the line you get. When you play the game and you put the piece on the line at the right and pull back the cue, it's not straight up and down because of the angle of the camera, so it's harder to judge the angle when you're shooting further from the center. Is there a way I could work around that?
I would greatly appreciate it if you could help me out.