[vtkusers] Normal of a point

Sugeng Waluyo sugengwalj at googlemail.com
Wed Dec 13 09:09:10 EST 2006


Hi,

you can do it by considering that one point belongs to many cells.
for ( cellId=0,....)
  get point id contained in each cell
  A[ptId][0]=A[ptId][0]+ normal[cellId]   //for first component of normal
vector
  ....
  ....

  make counter to know how many cell belong to that point

 for (ptId=0;...)
    for (i=0;i<3..)
    normal[i]=A[ptId][i]/counter[ptId]

u will get normal vector for each point.

rgds
sugeng



On 12/12/06, Obada Mahdi <omahdi at gmx.de> wrote:
>
> Hi Tony!
>
> On 12/10/06, tony hakki <tony2007vtk at yahoo.com> wrote:
> > I want to get normal vector of point around a cell/polygon in my  vtk
> class,
> > and I will have some points on that normal vector, and also I will get
> those
> > points density values. How can I obtain these with VTK (c++), Does
> anybody
> > have a such kind of example?
>
> I don't have an example at hands, but maybe some pointers will help
> for getting started:
>
> Generating point normals:
> vtkPolyDataNormals computes point normals from cell information in a
> polydata set
> http://www.vtk.org/doc/nightly/html/classvtkPolyDataNormals.html
>
> Pushing points along their associated normal vector:
> vtkWarpScalar can be used for generating points from an input data set
> by translating the source points along their normal vectors
> http://www.vtk.org/doc/nightly/html/classvtkWarpScalar.html
>
> Obtaining data attributes at specific point positions:
> vtkProbeFilter takes an input data set (for instance, your generated
> point set) and computes data attributes, like scalars--which might be
> representing density values in your case--by interpolating them from a
> source data set (say, image data representing a volume)
> http://www.vtk.org/doc/nightly/html/classvtkProbeFilter.html
>
> There might be examples in the VTK source tree demonstrating the use
> of some of these classes.
>
>
> HTH,
>
> Obada
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
sing enom ngormati sing tua, sing tua nyontoni sing bener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061213/a05e4591/attachment.htm>


More information about the vtkusers mailing list