Commit 6fb777d3 authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Improved documentation

parent 605ba203
# this is a tcl version to decimtae fran's face
# get the interactor ui
source vtkInt.tcl
# First create the render master
#
vtkRenderMaster rm;
# Now create the RenderWindow, Renderer and both Actors
#
set renWin [rm MakeRenderWindow];
set ren1 [$renWin MakeRenderer];
set iren [$renWin MakeRenderWindowInteractor];
# create a cyberware source
#
vtkCyberReader cyber;
cyber SetFilename "../../data/fran_cut"
cyber DebugOn;
#7347 triangles remain
vtkDecimate deci;
deci SetInput [cyber GetOutput];
deci SetTargetReduction 0.9;
deci SetAspectRatio 20;
deci SetInitialError 0.0002;
deci SetErrorIncrement 0.0005;
deci SetMaximumIterations 6;
deci DebugOn;
vtkSmoothPolyFilter smooth;
smooth SetInput [deci GetOutput];
smooth SetNumberOfIterations 20;
vtkPolyNormals normals;
normals SetInput [smooth GetOutput];
vtkPolyMapper cyberMapper;
cyberMapper SetInput [normals GetOutput];
vtkActor cyberActor;
cyberActor SetMapper cyberMapper;
eval [cyberActor GetProperty] SetColor 1.0 0.49 0.25;
eval [cyberActor GetProperty] SetWireframe;
# Add the actors to the renderer, set the background and size
#
$ren1 AddActors cyberActor;
$ren1 SetBackground 1 1 1;
$renWin SetSize 750 750;
# render the image
#
$iren SetUserMethod {wm deiconify .vtkInteract};
vtkCamera cam1;
cam1 SetClippingRange 0.0475572 2.37786;
cam1 SetFocalPoint 0.052665 -0.129454 -0.0573973;
cam1 SetPosition 0.327637 -0.116299 -0.256418;
cam1 CalcViewPlaneNormal;
cam1 SetViewUp -0.0225386 0.999137 0.034901;
$ren1 SetActiveCamera cam1;
$iren Initialize;
# prevent the tk window from showing up then start the event loop
wm withdraw .
$iren Start;
......@@ -78,17 +78,18 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
// "interior edge", and all others are "fixed" vertices.
//
// Once the classification is known, the vertices are smoothed
// differently. Corner vertices are not smoothed at all. Simple vertices are
// smoothed as before (i.e., average of connected vertex coordinates). Interior
// edge vertices are smoothed only along their two connected edges, and only
// if the angle between the edges is less than the EdgeAngle ivar.
// differently. Corner (i.e., fixed) vertices are not smoothed at all.
// Simple vertices are smoothed as before (i.e., average of connected
// vertex coordinates). Interior edge vertices are smoothed only along
// their two connected edges, and only if the angle between the edges
// is less than the EdgeAngle ivar.
//
// The total smoothing can be controlled by using two ivars. The
// NumberOfIterations is a cap on the maximum numper of combined expansion
// and contraction passes. The Convergence ivar is a limit on the maximum
// point motion. If the maximum motion during an iteration is less than
// Convergence, then the filter terminates execution. (Convergence is expressed
// as a fraction of the diagonal of the bounding box.)
// NumberOfIterations is a cap on the maximum numper of smoothing passes.
// The Convergence ivar is a limit on the maximum point motion. If the
// maximum motion during an iteration is less than Convergence, then the
// filter terminates execution. (Convergence is expressed as a fraction of
// the diagonal of the bounding box.)
//
// There are two instance variables that control the generation of error
// data. If the ivar GenerateErrorScalars is on, then a scalar value indicating
......@@ -99,6 +100,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
// An excellent reference for this technique is from Gabriel Taubin. "A
// Signal Processing Approach To Fair Surface Design." Proceedings of
// SIGGRAPH '95.
// .SECTION Caveats
// The Laplacian operation reduces high frequency information in the
// geometry of the mesh. With excessive smoothing important details may be
......@@ -107,6 +109,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
//
// The contraction factor is by default a positive value, while the expansion
// factor is a negative value. This is counter-intuitive for many people.
// .SECTION See Also
// vtkDecimate
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment