Code covered by the BSD License

4.0
4.0 | 1 rating Rate this file 10 Downloads (last 30 days) File Size: 22.2 KB File ID: #24937 Version: 1.2

# Curvature calculations on triangular 3D surface

### J. Ole Kaven (view profile)

05 Aug 2009 (Updated )

Calculate principal curvatures on a triangular mesh in 3D.

File Information
Description

Function to calculate the principal curvatures on a triangular mesh. Approximations of curvature are based on local (N=1) neighborhood elements and vertices.

Note: Directions of curvatures aren't calculated appropriately. Will post an updated version once this is implemented.

Note that calculations at vertices with few adjacent triangles, and hence few adjacent vertices, are expanded to a greater neighborhood.

Reference:
1) Chen and Schmitt (1992) Intrinsic surface properties from surface triangulation
2) Dong et al. (2005) Curvature estimation on triangular mesh, JZUS

This code makes use of routines: buildInverseTriangualtion.m & removeDO.m
initially written by: David Gringas. He is gratefully acknowledged

MATLAB release MATLAB 7.7 (R2008b)
07 Mar 2012 yvus

### yvus (view profile)

Hi,

I am very happy to find for the first time curvature estimation works on triangular meshes on matlab. Therefore I am very interested in the corrected version of the file.

Let me know when you have such a version, or, do you know an other file doing the same job than yours without this little bug?

Cheers
Yvus

Comment only
28 Jan 2010 J. Ole Kaven

### J. Ole Kaven (view profile)

Hi Matt
k1 is the maximum principal curvature. See Chen & Schmidt equation (6).

Comment only
28 Jan 2010 Matt

### Matt (view profile)

Works well, however, I routinely get a "divide by zero" warning at line 65, even when using a hyperbolic paraboloid:
[x,y]=meshgrid(-3:.25:3,-3:.25:3);
tri=delaunay(x,y);
z=0.25*x.^2-0.25*y.^2;

Also, is please be more specific in defining output of which is minimum/maximum curvature, k1 or k2. Thanks!