Trick Shot
This problem asks us if it is possible to sink 2 pool balls in a very specific manner giving an invented physics.
This problem is purely mathematical.
- We can calculate exactly where ball 3 must be struck in order to fall. (hint: colinear with ball 3 and the hole at a distance 2r from the center of ball 3)
- we can then calculate where ball 1 must be struck in order to reach the point calculated above in the same manner
- We can then calculate where ball 2 must be struck
- We can then determine the angle the cue ball must take after striking ball 1 before striking ball 2 (using the points calculated in 2 and 3)
- We can then determine the INCOMING angle of the cueball (the reflected business described in the problem)
- We can then intersect the line at the angle from 5 with the 'h' line
- if the intersection lies within w, it is possible
There are a couple other caveats:
- we have to check whether any of the above lines are impossible because they would intersect some other ball first. It should be sufficient to check that no other balls are within 2r of a given line over the range which we need the ball to travel freely (HINT: java line.ptsegdist)
- we have to check whether intersection points lie on the table
- We should not have to worry about whether the cue ball could later interfere with ball 3 as the problem indicates the speed is irrelevant