Math-Trig Apothem by Chord and Radius

From Vectorlab
Jump to: navigation, search


Given CHORD and RADIUS of an arc, returns the length of the APOTHEM. By Orso B. Schmid


{ Orso ***************************** }
{ given radius and chord, result is the apothem, }
{ the distance between chord and arc center, y value }
FUNCTION M_Trig_ArcApoByChordRadius(chord, radius: REAL): REAL;
	BEGIN
		M_Trig_ArcApoByChordRadius := Sqrt(4*(Sqr(radius)) - Sqr(chord))/2;
		{ a^2 + b^2 = r^2 }
		{ a^2 + (chord/2)^2 = r^2 }
	END;