[vtkusers] Hide far side of a volume

Patrick Brockmann Patrick.Brockmann at ipsl.jussieu.fr
Tue Nov 12 14:47:16 EST 2002


Hi all,
.
I am building a VTK application for visualization of
numeric global climate model output in Python.

Is there a way not to render opposite side of cells ?
I would like to have a Z-clipping functionnality to allow only renderering of direct face cells.
For now I have used the trick of a 2nd actor (a vtkTexturedSphereSource) to hide
the antipode cells of my model). Is there a simpler way ?

Regards
Patrick

See the following code and the attached figure where actors have been
separated to illustrate the question.
**********************************************************
package require vtk

# Create geometric sphere
vtkTexturedSphereSource sphereSource
    sphereSource SetRadius 10
    sphereSource SetThetaResolution 10
    sphereSource SetPhiResolution 10

vtkPolyDataMapper spheremapper
    spheremapper SetInput [sphereSource GetOutput]

vtkActor sphereActor
    sphereActor SetMapper spheremapper
    [sphereActor GetProperty] SetRepresentationToWireframe

vtkRenderer ren1
vtkRenderWindow renWin
    renWin AddRenderer ren1
    renWin SetSize 256 256
vtkRenderWindowInteractor iren
    iren SetRenderWindow renWin

ren1 AddActor sphereActor
ren1 SetBackground 0.1 0.2 0.4

renWin Render

wm withdraw .
**********************************************************



--

mailto:Patrick.Brockmann at ipsl.jussieu.fr
01.44.27.21.10 --> IPSL (Jussieu, Tour 26, 4eme)
01.69.08.77.22 --> LSCE (Orme des merissiers 701, 35G)
http://www.ipsl.jussieu.fr/~brocksce/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: picture_001.png
Type: image/png
Size: 27480 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021112/1b79ac1a/attachment.png>


More information about the vtkusers mailing list