[R] computing the radius of an arc

Greg Snow Greg.Snow at imail.org
Fri Jul 24 18:40:38 CEST 2009


There is a function "rsaga.local.morphometry" in the RSAGA package that says it computes curvature (among other things).  It looks like that function was designed for a different type of data than yours is, but it may work, or if not, then you may be able to adapt some of the code to work with your data.

Another idea: since the curvature is a function of the radius of the circle similar to the curve (or possibly sphere), you could find the least squares estimate of the circle/sphere that best fits the data (or a weighted subset along the lines of loess) then take the curvature from the radius of that circle/sphere.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Nair, Murlidharan T
> Sent: Friday, July 24, 2009 8:53 AM
> To: Hans W Borchers; r-help at stat.math.ethz.ch; Bert Gunter; 'Gabor
> Grothendieck'
> Subject: Re: [R] computing the radius of an arc
> 
> Thanks, for all the suggestions. Indeed I am interested in computing
> curvature (http://en.wikipedia.org/wiki/Curvature) of the curve that is
> given as a discrete set of points. I have the curve in 3D but I can
> certainly write it in 2D as well. Code is given at the bottom. I will
> try with the suggestions you have given, but if anyone has done this
> before, I would appreciate your help.
> Cheers../Murli
[snip]




More information about the R-help mailing list