<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
 
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">In a
previous message to this list, I asked about computing the visible  points/edges/faces 
<br>
of a solid body, in vtk. Finding the right filters and cleverly  connecting
them proved <br>
to be way beyond my vtk skills; it seemed to me that I was mercilessly  condemned
to <br>
implement my own filters. <br>
 <br>
Which I did; well, I tried to, anyway. <br>
 <br>
Shortly, I used a vtkSelectVisiblePoints to extract exactly those points
 that are visible, <br>
and then, from a copy of the initial vtkPolyData, I removed the points  that
are _not_ <br>
visible, and their adjacent cells. Surprisingly, it did something;  however,
not what <br>
I wanted.Surprising was the behavior of vtkSelectVisiblePoints: a  snapshot
of the <br>
output window is attached. <br>
 <br>
I expected to see a convex figure (well, ok - its projection on the view
 plane should <br>
have been convex). As you can see, there are four triangles that destroy
 the convexity. <br>
 <br>
For the time being, I can only blame my poor understanding of  vtkSelectVisiblePoints 
<br>
for this strange effect. I only hope that someone out there, more  advanced
than me, <br>
can reveal this interesting feature. <br>
 <br>
In the image, the first renderer has a 3D sphere, the second - the edges
 of the sphere, <br>
collected using vtkExtractEdges, and the third has the edges of the  visible
part of <br>
the sphere, according to vtkSelectVisiblePoints. <br>
 <br>
The algorithm for removing hidden cells is very simple: <br>
- for each point of the body <br>
- - if the point is not visible <br>
- - - remove the cells incident to this point, and all links to these cells 
<br>
- - - remove the point itself. <br>
 <br>
I am not attaching the program itself: Being written in C#, it is bound to 
<br>
be uninteresting for almost everybody. <br>
 <br>
Petru <br>
</div>
<center></center>
</body>
</html>