No BSD License  

4.64286
4.6 | 15 ratings Rate this file 82 Downloads (last 30 days) File Size: 1.77 KB File ID: #11168 Version: 1.0
image thumbnail

Surface Curvature

by

Daniel Claxton (view profile)

 

23 May 2006 (Updated )

Vectorized surface curvature computation

| Watch this File

File Information
Description

[K,H,P1,P2] = surfature(X,Y,Z) returns the gaussian curvature of a surface (K), mean curvature (H), and principal curvatures (P1,P2). The inputs (X,Y,Z) are 2D arrays corresponding to the surface being analyzed.

Example
[X,Y,Z] = peaks;
[K,H,P1,P2] = surfature(X,Y,Z);
surf(X,Y,Z,H,'facecolor','interp');
set(gca,'clim',[-1,1])

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (22)
28 May 2015 Thomas Atta-Fosu

Perfect!

29 Apr 2015 Hongli Yang  
29 Apr 2015 Hongli Yang

try to contact author, but email expired
do someone knows what the sign here means, for each point, the curvature could be positive or negative. If we want to have a mean curvature of the whole surface, should we consider the sign or not?

27 Oct 2014 Othmani

I am trying to run the code with 3D data but I gets this problem :
Error in ==> gradient at 49
[msg,f,ndim,loc,rflag] = parse_inputs(f,varargin);

??? Output argument "varargout{2}" (and maybe others) not assigned during call to "C:\Program
Files\MATLAB\R2010a\toolbox\matlab\datafun\gradient.m>gradient".

Error in ==> surfature at 11
[Xu,Xv] = gradient(X);

Comment only
30 Jun 2014 abuzer

abuzer (view profile)

thank you for code however it does not run for 3D data and the error occured.

Error in gradient (line 49)
[err,f,ndim,loc,rflag] = parse_inputs(f,varargin);

Comment only
06 Mar 2014 dong

dong (view profile)

 
03 Mar 2014 Ahmad

Ahmad (view profile)

this is that I want i.e. all types of curvature.
BUT(!) I have a point cloud that every point have x,y&z(3D coordinate).
Can I calculate curvature of each point?
If yes then how?
thank U

Comment only
22 Nov 2013 Daniel

Daniel (view profile)

 
23 Jul 2013 Caitlin

I am also wondering what the 2D input arrays corresponding to the surface are?

Comment only
08 Apr 2013 soudeh

soudeh (view profile)

Thank you for your code,
I am trying to obtain the principal curvatures (K1,K2) for each voxels(x,y,z) of a 3d image that has an intensity value. These values are calculated based on Gaussian and mean curvatures . How can I use your code in order to get my results.

Comment only
03 Dec 2012 bnu

bnu (view profile)

very good,thanks a lot!!

31 May 2011 vinu arasu

Could you please explain what is 2D arrays corresponding to the surface being analyzed??

Comment only
14 Sep 2010 Lucas Lorensi

Excellent! Is there a way to compute principal directions?

29 Apr 2010 Ted Teng

By definition, H>0 for convex surface, so it seems negative Z corresponding to convex?

Comment only
20 Nov 2009 Jason Zhang

Cool, see how it works!

27 Jun 2008 krog babuz'

Hi, could you please specify what the 2D arrays for X,Y,Z actually are?

20 May 2008 Su Ping

cool, I'm looking for this

26 Dec 2007 ewe wewe  
24 Jul 2007 Giancanio Sileo

Very good tool for curvature computation.

10 Jul 2007 Michael Girard

COOL

07 Feb 2007 mustafa yagci  
31 May 2006 Tao Ye

i've been trying to find code to perform some computational geometry tasks, this one is very much helpful. Thank you.

Contact us