Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫  π  -¹ ² ³ °

You are not logged in.

## #1 2008-12-05 04:40:13

neigaard
Member
Registered: 2008-12-05
Posts: 1

### Calculating position of background screen

Hi

Im a dumb math to math, and I need some help with a small computer game. I hope this is the right forum, if not could you maybe point me to the right one.

I have two screens, a background screen and the screen that is actually showing. The background screen is bigger than the screen showing, and the background screen moves and rotates while the screen showing stays still. See the background screen as a landscape where the showing screen can navigate around in. If the showing screen moves outside the background screen, the background screen (which is really the one that is moving) move so that what is visible of the background screen is like the landscape just continues. Its a bit hard to explain, so I added 3 drawings, where you should imagine that each square on the big background screen contains exactly the same background image, and thus if the showing screen is outside the background screen (picture math_02), the background screen must be moved so that what you see on the showing screen is correct. Does this make sense?

What I just cant figure out , is a formula (or more formulas maybe) that can calculate the exact position of the background screen in these cases. Can you help a math fool here?

I have the coordinates of the center of the background screen, the size of the background screen, the rotation angle of the background screen, the size of the shown screen, is any more needed?

Best regards and high hopes
Søren

Last edited by neigaard (2008-12-05 04:41:16)

Offline

## #2 2009-07-14 11:40:07

Liberia
Member
Registered: 2009-07-14
Posts: 1

### Re: Calculating position of background screen

I need some algorithm like this, very interesting.

Offline