Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm designing a Pong clone but am doing some experimental AI.

What I need to solve is this:

Assuming both paddles are stationary and excluding any walls:

The probability of a ball hitting one of the paddles at any position on the paddle, bouncing off at any arbitrary angle within the hemisphere of the normal of the paddle, and hitting the other paddle. In other words, out of all possible bounces off of the initial paddle, theoretically how many of those would hit the other paddle?

Is this possible to calculate? If so, can it be deduced to an equation?

share|cite|improve this question
up vote 2 down vote accepted

Suppose we are in an arena of height $H$ and width $L$, with paddles of width $w$ parallel to the height on either side. I'll try to attach a picture in just a bit. Suppose that we shoot a ball (that's infinitely small, a point) at a uniformly random angle $\theta\in[0,\pi]$ from the left paddle to the right paddle. Specifically, suppose that we shoot the ball from a height $h$ off the left side, and we are trying to hit a paddle of width $w$ on the right side, whose center is at height $p$ off the bottom wall.

First, let's consider directly hitting the paddle without bounces. To find the range $\Theta$ of hitting angles, notice that we get a triangle formed with height $L$ and width $w$. Using the two formulas we know for the area of a triangle, we get:


where $r_1=\sqrt{L^2+(h-(p-w/2))^2}$ and $r_2=\sqrt{L^2+(h+(p-w/2))^2}$, where we can now solve for $\Theta$ giving:


Now we need to figure out all other possible ways to hit the paddle, with bounces. This becomes easy if we stack arena's one atop the other in a periodic fashion, where we see that hitting the paddle is equivalent to crossing arena's. In other words, we need to find $\theta$ angles which hit paddles centered at $p+kH$ where $k\in\mathbb{Z}$. The idea is exactly the same as before, and we get:


where now every instance of $p$ in the definition of $r_1,r_2$ is replaced by $p(k)=p+kH$. Thus the probability of hitting the paddle will be the sum over all these chunks (convince yourself that they are disjoint geometrically) normalized by $\pi$:


which I am not sure how to further simplify...

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.