Hi,<br><br>you can do it by considering that one point belongs to many cells. <br>for ( cellId=0,....)<br>&nbsp; get point id contained in each cell<br>&nbsp; A[ptId][0]=A[ptId][0]+ normal[cellId]&nbsp;&nbsp; //for first component of normal vector
<br>&nbsp; ....<br>&nbsp; ....<br>&nbsp; <br>&nbsp; make counter to know how many cell belong to that point<br><br>&nbsp;for (ptId=0;...)<br>&nbsp; &nbsp; for (i=0;i&lt;3..)<br>&nbsp;&nbsp;&nbsp; normal[i]=A[ptId][i]/counter[ptId]<br><br>u will get normal vector for each point. 
<br><br>rgds<br>sugeng<br><br><br><br><div><span class="gmail_quote">On 12/12/06, <b class="gmail_sendername">Obada Mahdi</b> &lt;<a href="mailto:omahdi@gmx.de">omahdi@gmx.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Tony!<br><br>On 12/10/06, tony hakki &lt;<a href="mailto:tony2007vtk@yahoo.com">tony2007vtk@yahoo.com</a>&gt; wrote:<br>&gt; I want to get normal vector of point around a cell/polygon in my&nbsp;&nbsp;vtk class,<br>&gt; and I will have some points on that normal vector, and also I will get those
<br>&gt; points density values. How can I obtain these with VTK (c++), Does anybody<br>&gt; have a such kind of example?<br><br>I don't have an example at hands, but maybe some pointers will help<br>for getting started:<br>
<br>Generating point normals:<br>vtkPolyDataNormals computes point normals from cell information in a<br>polydata set<br><a href="http://www.vtk.org/doc/nightly/html/classvtkPolyDataNormals.html">http://www.vtk.org/doc/nightly/html/classvtkPolyDataNormals.html
</a><br><br>Pushing points along their associated normal vector:<br>vtkWarpScalar can be used for generating points from an input data set<br>by translating the source points along their normal vectors<br><a href="http://www.vtk.org/doc/nightly/html/classvtkWarpScalar.html">
http://www.vtk.org/doc/nightly/html/classvtkWarpScalar.html</a><br><br>Obtaining data attributes at specific point positions:<br>vtkProbeFilter takes an input data set (for instance, your generated<br>point set) and computes data attributes, like scalars--which might be
<br>representing density values in your case--by interpolating them from a<br>source data set (say, image data representing a volume)<br><a href="http://www.vtk.org/doc/nightly/html/classvtkProbeFilter.html">http://www.vtk.org/doc/nightly/html/classvtkProbeFilter.html
</a><br><br>There might be examples in the VTK source tree demonstrating the use<br>of some of these classes.<br><br><br>HTH,<br><br>Obada<br>_______________________________________________<br>This is the private VTK discussion list.
<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br><br clear="all"><br>-- <br>sing enom ngormati sing tua, sing tua nyontoni sing bener