Difference between revisions of "Maximum Escape Angle/Precise Positional/Non-Iterative"
m (clean) |
m (fix) |
||
Line 9: | Line 9: | ||
a<sup>2</sup> + 1<sup>2</sup> - 2 a cosθ = (Vb / Vr a)<sup>2</sup> | a<sup>2</sup> + 1<sup>2</sup> - 2 a cosθ = (Vb / Vr a)<sup>2</sup> | ||
− | Let x = a cosθ, y = a sinθ, | + | Let x = a cosθ, y = a sinθ, k = 1 / ((Vb / Vr)<sup>2</sup> - 1), we have: |
− | (x + | + | (x + k)<sup>2</sup> + 2 k x = 1<sup>2</sup> (k<sup>2</sup> + k) |
− | The points defined by (x, y) satisfying above formula is a circle e with center = P(- | + | The points defined by (x, y) satisfying above formula is a circle e with center = P(-k, 0), and radius = sqrt(k<sup>2</sup> + k). |
To find precise positional max escape angle, select the max of the escape angles calculated from the intersections of the above circle and the walls, or use traditional max escape angle when no intersection can be found. | To find precise positional max escape angle, select the max of the escape angles calculated from the intersections of the above circle and the walls, or use traditional max escape angle when no intersection can be found. |
Revision as of 16:41, 6 August 2019
Consider a situation where a bullet fired from the firer A hits the target C at some future position B. A is the angle opposite to a, B is opposite to b, and C is opposite to c.
Let the target C be the origin, the distance and orientation from the target to the firer be the unit length and positive x-axis respectively.
Let θ be the angle between b and a, we have c / a = Vb / Vr, b = 1, where Vb and Vr is the velocity of the bullet and the target respectively. Now consider cosine formula:
a2 + 12 - 2 a cosθ = (Vb / Vr a)2
Let x = a cosθ, y = a sinθ, k = 1 / ((Vb / Vr)2 - 1), we have:
(x + k)2 + 2 k x = 12 (k2 + k)
The points defined by (x, y) satisfying above formula is a circle e with center = P(-k, 0), and radius = sqrt(k2 + k).
To find precise positional max escape angle, select the max of the escape angles calculated from the intersections of the above circle and the walls, or use traditional max escape angle when no intersection can be found.