@Travis.Biddle,
Good... CCW.
Yes there is still a problem with coordinates to 2 places.
The distance from center to start will most likely not equal the distance from center to end, nor equal the radius.
So, you have several options...
1. Hold the center and start; take the radius from them; and locate the end via (polar center (angle center end) radius)
2. Hold the center and end; take the radius from them; and locate the start via (polar center (angle center start) radius)
3. Triangulate from the start and end, holding the radius, to locate the center.
4. Average the two distances from center to start and center to end to use as the radius and triangulate to locate the center as in #3.
5. Average the radius and the two distances from center to start and center to end to use as the radius and triangulate to locate the center as in #3.
6. Compute the delta between the start and end radials.
Hold the chord distance between the start and end.
Rearrange the formula C=2Rsin(delta/2) to determine R=C/2sin(delta/2)
Triangulate using R to locate the center. (of course that will change the delta slightly)
Triangulation can be performed using an arc-arc intersect (see functions below). Since there are two solutions, you take the one nearest to the given center.
;;------------------------------------------------------
;; Function to return the arccos of an angle in radians:
;;
(defun @acos (cosine / sine)
(cond
((zerop cosine)(* pi 0.5))
((<= cosine -1.0) pi)
((>= cosine 1.0) 0.0)
(1 (atan (/ (sqrt (- 1.0 (expt cosine 2))) cosine)))
)
)
;;------------------------------------------------------
;; Function to return the arcsin of an angle in radians:
;;
(defun @asin (sine / cosine)
(setq cosine (sqrt (- 1.0 (expt sine 2))))
(if (zerop cosine)(setq cosine 0.000000000000000000000000000001))
(atan (/ sine cosine))
)
;;----------------------------------------------------
;; Function to find a point common to 2 arcs,
;; given both centers and radii, and a nearest point:
(defun @aai (rp1 r1 rp2 r2 near / base x ang a p1 p2)
(setq base (distance rp1 rp2))
(cond
((and (equal r1 0.0 fuzz)(equal r2 base fuzz)) rp1)
((and (equal r2 0.0 fuzz)(equal r1 base fuzz)) rp2)
((> (+ r1 r2) base)
(setq x (/ (- (+ (* base base)(* r1 r1)) (* r2 r2)) base 2.0))
(if (minusp x)
(setq ang (angle rp2 rp1) x (- x))
(setq ang (angle rp1 rp2))
)
(setq a (@acos (/ x r1))
p1 (polar rp1 (+ ang a) r1)
p2 (polar rp1 (- ang a) r1)
p1 (if (< (distance p1 near)(distance p2 near)) p1 p2)
)
p1
)
(1 (prompt "\nInvalid. Radii too small."))
)
)