Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: maxima of curvature
Date: Mon, 3 Mar 2008 14:20:23 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 33
Message-ID: <fqh1f7$icm$1@fred.mathworks.com>
References: <fqgmnf$oin$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1204554023 18838 172.30.248.38 (3 Mar 2008 14:20:23 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 3 Mar 2008 14:20:23 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:455032



"Mario " <nospam@yahoo.com> wrote in message <fqgmnf$oin
$1@fred.mathworks.com>...
> Hi.
> I have a list of points describing the outlines points of a
> shape. I'd want to find the points of maximum curvature. To
> do that I should calculate the tangential angle of each
> point on the shape outline ad from these angles I'll
> calculate the curvature by differentiation. I was wondering
> if there's any matlab function to solve this problem.
> Thanks in advance.
> 
> Mario
----------
  If your outline points are specified with sufficient accuracy, you can calculate 
the curvature of a circumscribing circle through each three successive points 
as an approximation to the curvature at the middle of these.  That is, if P1, 
P2, and P3 are three successive outline points given as two-element row or 
column vectors in terms of their x,y coordinates, then do this:

 a = norm(P2-P1); % Distance from P1 to P2
 b = norm(P3-P2); % Distance from P2 to P3
 c = norm(P3-P1); % Distance from P1 to P3
 cv = sqrt((a+b+c)*(b+c-a)*(c+a-b)*(a+b-c))/(a*b*c); % Curvature

Then cv is the curvature (the reciprocal of the radius) of a circle through the 
points P1, P2, and P3, and as such constitutes an approximation to the 
curvature at the middle point, P2.

  Using this technique avoids the problem of dealing with points where the 
slope of the tangent line, dy/dx, becomes very large or infinite.

Roger Stafford