I'm working on an algorithm to allow a vehicle to reverse and then line up and stop on a given spot facing a specific direction. The best approach I've been able to come up with involves two internally tangent circles with the larger extending from the point of tangency of the vehicle.
Vehicle starts at point A and is parallel with tangent line T. Vehicle reverses to B, then moves forward to C, then to A so that it is parallel with the vector displayed instead. r represents the minimum turning radius of the vehicle
Given that line AC is always arranged vertically and knowing point A, but that the tangent line T can vary, is it possible to be able to determine points B and C? If not what other info is needed?
For simplicity I've made it so that the radius of the larger circle is twice the radius of the smaller. If this restriction is not required to solve the problem how could this larger radius be determined as well?
](https://i.stack.imgur.com/oN0NV.png)
](https://i.stack.imgur.com/EdBWA.png)
](https://i.stack.imgur.com/Oq1As.png)


Let the direction vector of the tangent line be $ \mathbf{d} = (\cos \theta, \sin \theta) $, then the normal vector pointing "downward" is $ \mathbf{n} = (\sin \theta, - \cos \theta)$. Take a certain value of $r$, and compute the center of the big circle as follows:
$ \mathbf{O} = \mathbf{A} + 2 r \mathbf{n} $
Assume that point $\mathbf{C}$ is "below" point $\mathbf{A}$ and such that $\overline{\mathbf{AC}} = x \gt 0 $, then the coordinates of $\mathbf{C}$ are
$ \mathbf{C} = \mathbf{A} + (- x, 0 ) $
And the center of the small circle is
$ \mathbf{O'} = \mathbf{C} + (0, r ) = \mathbf{A} + (-x, r) $
Now now from the description of the problem, we want the distance $\overline{\mathbf{OO'}} = r $
This gives a quadratic equation in $x$ which has two possible solutions.
Explicitly, the equation is
$ x^2 - 4 r x \cos \theta + 4 r^2 (1 - \sin \theta ) = 0 $
And its solutions $x$ are determined by the quadratic formula.
To calculate $\mathbf{B}$, define the vector
$ \mathbf{v} = \mathbf{O'} - \mathbf{O} $
Then
$ \mathbf{B} = \mathbf{O'} + \mathbf{v} = 2 \mathbf{O'} - \mathbf{O} $
The two figures show the two possible solutions for $\theta = \dfrac{\pi}{4} $, and $r = 5$.