[Bf-committers] Mesh curvature estimation

Tamito KAJIYAMA rd6t-kjym at asahi-net.or.jp
Tue Nov 29 02:08:52 CET 2011


For your information, the GSoC 2008 Freestyle branch contains
C++ code for computing principal curvatures and directions.
The code seems to be based on published schemes (Meyer et al.
2002 and Cohen-Steiner et al. 2003) as indicated by citations in
comments.  These references are cited by Rusinkiewicz's paper
you have cited.  The curvature code is in
and an application is in FEdgeXDetector::computeCurvatures() in


KAJIYAMA, Tamito <rd6t-kjym at asahi-net.or.jp>

-----Original Message----- 
From: Nicholas Bishop 
Sent: Monday, November 28, 2011 12:38 AM 
To: bf-blender developers 
Subject: [Bf-committers] Mesh curvature estimation 

Hi all,

A few times I've run into algorithms that require principal curvatures
[1] as inputs. My cursory examination of the Blender source (basically
just grepping for "curvature") didn't turn up any code for this, so I
ported the (GPLv2) curvature code from the trimesh2 lib [2] to
Blender. That code is based on the paper "Estimating Curvatures and
Their Derivatives on Triangle Meshes" [3]. Dunno if this is useful to
anyone else, but I've pushed a Blender branch [4] containing the
curvature calculation (in blenlib/intern/curvature.c), as well as a
test modifier that displays the curvature vectors.

Screenshot with Suzanne: http://www.pasteall.org/pic/show.php?id=21557

The original code was in C++; I converted it to C and switched the
math stuff over to blenlib and the types to MVert/MFace/etc. The
per-vertex output is the two principal curvatures and two direction
vectors. I haven't updated the code to handle quads yet, it'll
assert() if it encounters a non-triangle face. I've only just gotten
this working, so there are definitely bugs in it yet. :)


[1] http://en.wikipedia.org/wiki/Principal_curvature
[2] http://gfx.cs.princeton.edu/proj/trimesh2/
[3] http://gfx.cs.princeton.edu/pubs/_2004_ECA/
[4] https://gitorious.org/~nicholasbishop/blenderprojects/nicholasbishop-blender/commits/tri-curvature

More information about the Bf-committers mailing list