A photon moving at speed in the -plane starts at at heading due east.
Around every integer lattice point in the plane, a circular mirror of radius has been erected.
How far from the origin is the photon at ?
Give your answer to 3 decimal places.
Note: This problem might need computational aids for solving
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This is a very non-trivial problem, so I'll break it down into pieces. The general outline of my approach is this:
1) Record the position and velocity values
2) Determine the travel distance to the next collision point with one of the circles
3) Update the position (corresponding to the next collision point)
4) Update the velocity to reflect the bounce
5) Go back to Step 1 and repeat this process until enough bounces have happened to account for at least 10 seconds of time passage.
Some of these steps require some additional explanation
Derivation for Step 2:
2a) Start at point P = ( x , y ) with velocity v . Note that for this problem, v is a unit-vector.
2b) Equation of circle with center ( m , n ) : ( x − m ) 2 + ( y − n ) 2 = R 2
2c) If we start at P with velocity v and travel a distance α , this can be represented as:
( x + α v x − m ) 2 + ( y + α v y − n ) 2 = R 2 α 2 v x 2 + 2 v x ( x − m ) α + ( x − m ) 2 + α 2 v y 2 + 2 v y ( y − n ) α + ( y − n ) 2 − R 2 = 0
a = v x 2 + v y 2 b = 2 v x ( x − m ) + 2 v y ( y − n ) c = ( x − m ) 2 + ( y − n ) 2 − R 2
α = 2 a − b ± b 2 − 4 a c
2d) Search over a space of integer (m,n) pairs within the range of (-10,10), and find the minimum positive α value, which is the travel distance to the boundary of the nearest circle. Also store the (m,n) coordinates so that the normal and tangential vectors can be calculated for Step 4.
Processing for Step 3
x n e w = x o l d + α v x y n e w = y o l d + α v y
Derivation for Step 4:
Calculate the x and y coordinates of the normal and tangential vectors:
n x = x − m n y = y − n t x = − n y t y = n x
Resolve the velocity just prior to the bounce into a linear combination of the normal and tangential vectors:
v x = σ n x + γ t x v y = σ n y + γ t y
Rearranging the second equation gives: γ = t y v y − σ n y
Substituting into the first equation and solving for σ gives:
σ = n x − t y n y t x v x − t y v y t x
Plugging the value of σ back into the γ equation allows us to solve for that parameter. In order to model the bounce, we reverse the normal component of the velocity and preserve the tangential component as follows:
v x n e w = − σ n x + γ t x v y n e w = − σ n y + γ t y
Python Code:
Code Output for 20 Bounces (these are the x and y coordinate pairs associated with each collision):
I then imported the data into Excel. Knowing the present and previous coordinates, as well as the velocity magnitude (equal to one), it is simple to associate a time value with each collision. A final linear interpolation gave the coordinates associated with a time value of 10 seconds. At 10 seconds, the distance from the origin is approximately 0.995263.