[vtkusers] vtkDelaunay2D example
Sylvain Jaume
sylvain.jaume at kitware.com
Fri Aug 24 13:01:55 EDT 2007
Hi Daniela,
Example of vtkDelaunay2D can be found here:
http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Graphics/Testing/Cxx/TestDelaunay2D.cxx?root=VTK&content-type=text/plain
The output is a vtkPolyData. So you need vtkPolyDataMapper, not
vtkDataSetMapper.
HTH,
Sylvain
Daniela Castelluccia wrote:
> Hi Sylvain,
> I'm trying with vtkDelaunay2D ( which makes triangles ) usign the
> BoundaryTriangulation method:
>
> vtkFeatureEdges feature
> feature SetInput originalPolydata
> feature BoundaryEdgesOn
> feature FeatureEdgesOff
> feature NonManifoldEdgesOff
> feature ManifoldEdgesOff
>
>
> vtkDelaunay2D del
> #vtkDelaunay3D del
> del SetInput [feature GetOutput]
> del BoundingTriangulationOn
> del SetTolerance 0.001
> del SetAlpha10.0
>
> vtkDataSetMapper map
> map SetInput [del GetOutput]
>
> vtkActor triangulation
> triangulation SetMapper map
> [triangulation GetProperty] SetColor 1.0 0.49 0.25
>
> #vtkPolyDataMapper mapper
> #mapper SetInput originalPolydata
> #vtkActor original
> # original SetMapper mapper
> # [original GetProperty] SetColor 1.0 0.0 0.0
>
> vtkRenderer ren1
> vtkRenderWindow renWin
> renWin AddRenderer ren1
> vtkRenderWindowInteractor iren
> iren SetRenderWindow renWin
>
>
> ren1 AddActor triangulation
> #ren1 AddActor original
> ren1 SetBackground 1 1 1
> renWin SetSize 900 900
> renWin Render
>
> wm withdraw .
>
>
> How can I set the right parameters for Delaunay trinagulation?
> Have you some examples?
>
>
>
More information about the vtkusers
mailing list