Parallel Parking Mathematics
Author: Jerome A White
Date: December 15, 2009

A demonstration of the mathematics behind the NPR story British Mathematician Perfects Parallel Parking (Dec 15, 2009)
http://www.npr.org/templates/story/story.php?storyId=121453226

Three applications of the Pythagorean Theorem confirm this equation.
Assumptions:
* Center of rotation lies on the same line as the rear axle.
* Curb-to-curb turn radius r is the distance between the center of rotation and the center of the outer front tire's outer wall.
* Protrusion of turned front tires beyond rectangular perimeter of car is negligible.

w: width of vehicle in front

r: curb-to-curb turning radius

Parking length required beyond full car length:

jeromeAwhite

optimized = false
w_1 = 7.5 (slider from 5 to 10, step 0.1)
l = 9.4 (slider from 5 to 15, step 0.1)
k = 3.5 (slider from 0 to 5, step 0.1)
n: l + k
r = 35 (slider from 25 to 45, step 1)
r_b: sqrt(r^(2) - l^(2))
w_0 = 6.1 (slider from 4 to 10, step 0.1)
r_c: 2 * r_b - w_0
d_c = 1.2 (slider from 0 to 3, step 0.1)
m: r_b - w_0 - d_c + w_1
α_1: asin((r_b^(2) - r_c^(2) - m^(2)) / (2 * r_c * sqrt(m^(2) + n^(2)))) + atan(m / n)
α = 0.15707963267948966 rad (slider from 0 to 0.3490658503988659, step 8.726646259971648E-4)
B: (l + k, d_c)
D: B + (0, w_0)
E: (0, d_c)
F: E + (0, w_0)
I: F + (0, -1 * sqrt(r^(2) - l^(2)))
α_2 = If(optimized, α_1, α)
E' = Rotate(E, α_2, I)
F' = Rotate(F, α_2, I)
I' = Mirror(I, (E' + F') / 2)
B' = Rotate(B, α_2, I)
e = Circle(I', B')
f = Segment((0, w_1), (Radius[e], w_1))
J' = Intersect(e, f)
w_2 = 8 (slider from 5 to 10, step 0.1)
j = 3 (slider from 0 to 5, step 0.1)
A: (-1 * j, d_c)
C: A + (0, w_0)
A' = Rotate(A, α_2, I)
C' = Rotate(C, α_2, I)
f_1 = Segment((x(C'), w_2), (0, w_2))
D' = Rotate(D, α_2, I)
poly1', a', b', d', c' = Polygon(A', B', D', C')
R = Intersect(f_1, c')
z = 0.05 (slider from 0 to 1, step 0.05)
z_1: -2 * z + 2
θ_1: z_1 * α_2
N: (If[y(C') > w_2, x(R), x(C')], 0)
C'_1 = Rotate(C, θ_1, I)
Q: N + (-1 * j - k - l, 0)
w_t = 0.6
G: E + (l, 0)
H: F + (l, 0)
J: (If[x(J') > x(D), x(J'), x(D)], w_1)
poly1, a, b, d, c = Polygon(A, B, D, C)
K: J + (j + k + l, 0)
L: (x(J), 0)
M: (x(K), 0)
poly2, j_1, k_1, m_2, l_1 = Polygon(J, K, M, L)
poly3, h, i, n_1, p = Polygon(N, N + (0, w_2), Q + (0, w_2), Q)
g = Segment(I, I')
β = 0.5235987755982985 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
z_2: -2 * z + 1
θ_2: z_2 * β
A'' = Rotate(A', θ_2, I')
B'' = Rotate(B', θ_2, I')
D'' = Rotate(D', θ_2, I')
C'' = Rotate(C', θ_2, I')
poly1'', a'', b'', d'', c'' = Polygon(A'', B'', D'', C'')
A'_1 = Rotate(A, θ_1, I)
B'_1 = Rotate(B, θ_1, I)
D'_1 = Rotate(D, θ_1, I)
poly1'_1, a'_1, b'_1, d'_1, c'_1 = Polygon(A'_1, B'_1, D'_1, C'_1)
q = Circle(I, D)
s = Segment(G, H)
t = Segment(E, F)
G' = Rotate(G, θ_1, I)
H' = Rotate(H, θ_1, I)
s' = Segment(G', H')
G'_1 = Rotate(G, α_2, I)
H'_1 = Rotate(H, α_2, I)
s'_1 = Segment(G'_1, H'_1)
a_1 = Segment(E', F')
E'' = Rotate(E', θ_2, I')
F'' = Rotate(F', θ_2, I')
O = Rotate(G'_1, θ_2, I')
P = Rotate(H'_1, θ_2, I')
c_1 = Segment(O, P)
b_1 = Segment(E'', I')
E'_1 = Rotate(E, θ_1, I)
F'_1 = Rotate(F, θ_1, I)
t' = Segment(I, F'_1)
poly4, m_1, q_1, d_1, e_1 = Polygon(M, Q, Q + (0, -1 * w_1), M + (0, -1 * w_1))
Δy = -5
h_1 = Segment((x(N), d_c + w_0 / 2), (x(A), d_c + w_0 / 2))
i_1 = Segment((x(B), d_c + w_0 / 2), (x(J), d_c + w_0 / 2))
text2: "d  =  " + h_1 + "+" + i_1 + "  =  " + (h_1 + i_1)
text3: "optimized α = " + (α_1 * 180 / 3.141592653589793) + "°"