Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: curvature and radius of curvature of a plane curve Date: Thu, 15 Jul 2010 20:19:19 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 16 Message-ID: <i1nqg7$5n1$1@fred.mathworks.com> References: <ef5d840.-1@webcrossing.raydaftYaTP> <ellieandrogerxyzzy-1507070827520001@dialup-4.232.57.106.dial1.losangeles1.level3.net> <ellieandrogerxyzzy-1607070133420001@dialup-4.232.60.142.dial1.losangeles1.level3.net> <h418sh$p59$1@fred.mathworks.com> <h554pn$dmf$1@fred.mathworks.com> <i1n85c$dkn$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-02-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1279225159 5857 172.30.248.37 (15 Jul 2010 20:19:19 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 15 Jul 2010 20:19:19 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:653521 "Andrew " <leifer@fas.harvard.edu.removethis> wrote in message <i1n85c$dkn$1@fred.mathworks.com>... > Hi Roger, > Thank you. I found your short sample code and explanation very useful. With your permission, I would like to use it in an open-source (GPL) analysis tool I am writing. I would acknowledge you and reference this posting. I can't seem to contact you via email directly. Please let me know how best to reach you. > > Best, > Andy - - - - - - - - - Andy, I am not very familiar with GPL licensing provisions, but assuming that they do not restrict the further free distribution of such computer code, I would have no objection to your plans to include my piece of matlab code from this thread in your "tool". It is important to realize both the strengths and weaknesses of this circle-fitting code. It does well for points that lie in an approximate arc which covers a large fraction, say a half or a third, of a complete circle even if there is considerable noise present in the points. It also does well for points that lie in an arc which constitutes only a small fraction of a circle provided there is comparatively little noise present - that is, provided the points do actually lie close to a circular arc. It does not do so well in cases where there is substantial noise present in the points' locations and only a small fraction of a full circle is occupied. By looking at matlab plots I have made of an ideal circle with associated noisy points on a small arc of it and comparing these with the algorithm results, it is clear that in such difficult cases, a human could very likely draw a better circle to fit the points than is generated by the code. To come up to a human's level of performance would probably require a comparatively sophisticated pattern recognition algorithm rather than the present algorithm's simple least squares approach. It is also important to point out to potential users that the code assumes the cartesian coordinates of points in two-dimensional space to be fitted to a circle have been previously stored in two column vectors which are referred to as x and y. Row vectors would come to grief here with matlab's backslash operator. Roger Stafford