Calculating circle radius from two points on circumference (for game movement)

I'm designing a game where objects have to move along a series of waypoints. The object has a speed and a maximum turn rate. When moving between points p1 and p2 it will move in a circular curve like so:

enter image description here

Angle a is the angle the object must rotate through. Therefore we can calculate the time it will take to rotate through this angle as t = a / turn rate.

However, if the object's current speed means it will cover distance d in quicker than this time, it must slow down on this corner or it will miss p2. I need to calculate the maximum speed it can take this corner at, which means calculating the distance of the curve d (so I can calculate the maximum corner speed as d / t).

I think I've figured out b = 2a, but to determine d I need to know the radius of the circle. How can I determine it from this information?


Solution 1:

[Sorry, figure-fu misplaced]

The angle between the line $P_1 P_2$ and the radius is $\frac{\pi}{2} - \alpha$, where $\alpha$ is the angle you seem to call $a$. By symmetry, the angle at $P_2$ is the same, so the angle $\beta$ at the center is just $2 \alpha$. By the law of cosines, if $d$ is the linear distance between $P_1$ and $P_2$: $$ d^2 = 2 r^2 (1 - \cos (2 \alpha)) $$ I'm sure this can be simplified further...