|
|

Welcome
to Curvature Visualization Project Homepage!
1. Introduction
2. About Mesh
Curvatures Here we adopt the convention that a curvature is taken to be positive if the curve turns in the same direction as the surface's chosen normal, otherwise negative. The Gaussian curvature, named after Carl Friedrich Gauss, is equal to the product of the principal curvatures, k1k2. It has the dimension of 1/length2 and is positive for spheres, negative for one-sheet hyperboloids and zero for planes. It determines whether a surface is locally convex (when it is positive) or locally saddle (when it is negative).
Source:
wikipedia
The Visualization ToolKit (VTK)
is an open source, freely available software system for 3D computer
graphics, image processing, and visualization used by thousands of
researchers and developers around the world.
VTK consists of a C++ class library, and several interpreted
interface layers including Tcl/Tk, Java, and Python. Professional
support and products for VTK are
provided by Kitware, Inc.
VTK supports a wide variety of
visualization algorithms including scalar, vector, tensor, texture, and
volumetric methods; and advanced modeling techniques such as implicit
modelling, polygon reduction, mesh smoothing, cutting, contouring, and
Delaunay triangulation. In addition, dozens of imaging algorithms have
been directly integrated to allow the user to mix 2D imaging / 3D
graphics algorithms and data. The design and implementation of the
library has been strongly influenced by object-oriented principles.
VTK has been installed and tested on
nearly every Unix-based platform, PCs (Windows 98/ME/NT/2000/XP), and
Mac OSX Jaguar or later.
Source: http://www.vtk.org
4. Code: vtkCurvatures *curv = vtkCurvatures::New(); curv->SetInputConnection(norm->GetOutputPort()); curv->SetCurvatureTypeToMean(); vtkPolyDataMapper *polyMap2 = vtkPolyDataMapper::New(); polyMap2->SetInputConnection(curv->GetOutputPort());Easy hah?! But the color coding is not very interesting! If you want to have a nice color coding you should also add the following lines to make a Lookup Table: vtkLookupTable* lut=vtkLookupTable::New(); lut->SetHueRange(0.0,0.6); //Red to Blue lut->SetAlphaRange(1.0,1.0); lut->SetValueRange(1.0,1.0); lut->SetSaturationRange(1.0,1.0); lut->SetNumberOfTableValues(256); lut->SetRange(-100,100); lut->Build(); polyMap2->SetLookupTable(lut);And the result is impressive, isnt it? But don't get too excited! ;)
5. Results
|