Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


joa
Posts:
182
Registered:
11/3/05


Re: curvature of circle through three points
Posted:
Feb 3, 2006 11:46 AM


Because it's Friday.
function k = kfrom3points(xs,ys);
%KFROM3POINTS Calculate curvature of a circle given 3 points
%
% K = KFROM3POINTS(XS,YS)
% Where
% XS holds 3 x values
% YS holds 3 y values
% Then
% K is the curvature of the circle through the points
xs=xs(:); % columnize xs
ys=ys(:); % columnize ys
os = ones(3,1);
ss = xs.^2+ys.^2; % sum of squares
a = det([xs ys os]); % Eq. 31
d = det([ss ys os]); % Eq. 32
e = det([ss xs os]); % Eq. 33
f = det([ss xs ys]); % Eq. 34
r = sqrt((d^2+e^2)/(4*a^2)(f/a)); % Eq. 30
k=1/r; % curvature



