A coworker was able to figure out what to do here:
In the lisp code, the angle a
(aka theta) was just simplified to 2atan(b)
as opposed to 4atan(b)
because later we only need half the angle for some calculations of the center point c
and radius r
, not the whole angle.
The lisp angle
function finds the angle of a vector (in this case, p1 -> p2
) where 0 is the positive x axis, pi / 2
is positive y axis, and so forth. That angle of that chord, plus the angle between the cord and vector p1 -> c
, which is (pi - pi/2 - a)
, gives us enough to do a polar coordinate calculation to find the coordinates of the center point c
.