No BSD License  

Highlights from
Mean Curvature (Fast code)

3.4

3.4 | 7 ratings Rate this file 24 Downloads (last 30 days) File Size: 2.07 KB File ID: #10010

Mean Curvature (Fast code)

by Pratik Kamdar

 

15 Feb 2006 (Updated 22 Mar 2006)

Calculate the Mean curvature of a given surface (x,y,z) using vectorized form.

| Watch this File

File Information
Description

This function is a modified form of original code (see below). I vectorized the code to make the code time efficient.

The function calculates the mean curvature of the input structured matrix data. The input are the coordinate matrices of x,y & z (as generated by meshgrid or similar functions).

The outputs are a matrix containing the mean curvature at each point and a scalar giving the surface average mean curvature (SAMC).

Mistake found by Anthony Beaucamp. Thanks for letting me know! File has been updated.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Mean Curvature

MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements na
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
16 Feb 2006 M. Tetouan

Computing the mean curvature of an implicit surface is very simple and straightforward. The challenging problem is how to efficiently compute the curvatures of a 3D triangle mesh. The most common representation of a 3D surface in computer graphics is the triangle mesh which consists of a set of vertices (geometry) and a set of faces (connectivety).

18 Feb 2006 John D'Errico

That this function does not work on a triangulation does not make it worth deletion. It merely makes it of less value to at least one user than it might be otherwise.

I do have two issues though. First is the claim in the description that it works on a "point cloud". The phrase point cloud suggests an unstructured set of points. This code requires a structured array of data, as meshgrid might have generated. My second comment is a related one - There is very little information supplied in the help to this function, only one vague line. I'd have preferred a much better description of what the inputs must be. Ordinarily I'd have given this file a rating of 2 due to these flaws, but since its already gotten a rating of 1, I chose to round up.

20 Feb 2006 Pratik Kamdar

Thnx for the comments John. I will update the file description. Presently, I am having trouble logging into my account.

25 Feb 2006 John D'Errico

Cleaned up the help and description. I also compared this code to its predecessor - on a 100x100 grid, I saw a 40x speedup.
(This review may appear twice.)

21 Mar 2006 Anthony Beaucamp

That's a big improvement from the original code, but you made a mistake: It's not (2.*(E.*G)-F.^2) but 2.*((E.*G)-F.^2). Anyway, I am working on an extended version that calculates everything: Principal Curvatures, Directions, Mean and Gaussian. I will post it as soon as it's ready.

21 Mar 2006 Pratik Kamdar

File updated to remove error found by Anthony Beaucamp. Thanks for letting me know! Dont know how I missed that! Btw, the original file also has the same error.

05 Apr 2006 Claude Gouedard

It seems I recognize my own code (!) I sent you because I told you that yours was not in the Matlab spirit ...
I don't see any citation ...no thanks ...

05 Apr 2006 Claude Gouedard

I apologize !
I didn't send my code to you ...
It was to Ahmed Elnagar about "Gaussian Curvature " http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=5229&objectType=file

However ...
this code, yours, sounds a lot like mine. Perhaps there is only one way to program fine ....

06 Apr 2006 Pratik Kamdar

@Claude Gouedard:

I acknowledged the original author in my post. I dont think I am responsible for any missing citations on the part of the original author.
(This review might appear twice).

29 Jul 2007 mehdi ravanbakhsh

Hi pratik,
Can you please let me know how I can use your code to calculate the curvature of a 2-D curve?
Thanks,Mehdi

Please login to add a comment or rating.
Updates
23 Feb 2006

To provide better description of the function

23 Feb 2006

To provide better description of the function

23 Feb 2006

To provide better description of the function

23 Feb 2006

To provide better description of the function

23 Feb 2006

To provide better description of the function

23 Feb 2006

update description

22 Mar 2006

Mistake in formula. Found by Anthony Beaucamp. Thanks for letting me know!

Tag Activity for this File
Tag Applied By Date/Time
gaussian curvature Pratik Kamdar 22 Oct 2008 08:15:56
mean curvature Pratik Kamdar 22 Oct 2008 08:15:56
first fundamental form Pratik Kamdar 22 Oct 2008 08:15:56

Contact us at files@mathworks.com