Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ecpcitest
vtk-m
Commits
6fb777d3
Commit
6fb777d3
authored
Mar 30, 1996
by
Will Schroeder
Browse files
ENH: Improved documentation
parent
605ba203
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/tcl/smoothFran.tcl
0 → 100644
View file @
6fb777d3
# 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
[
$ren
Win MakeRenderer
];
set iren
[
$ren
Win 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
;
$ren
Win 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
;
include/vtkSmoothPolyFilter.hh
View file @
6fb777d3
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment