[vtkusers] Re: homogenizing vector fields on strongly refined grids
    Thomas Dunne 
    thomas.dunne at iwr.uni-heidelberg.de
       
    Thu Jan  6 17:20:32 EST 2005
    
    
  
Hello,
> I work with results/grids that are locally refined, sometimes very 
> much. When viewing the vector field with hedgehogs this becomes 
> troublesome, since there are very dense fields of hedgehogs where there 
> is much local refinement.
> 
> I would like to spread a selected number of hedgehogs evenly in the domain 
> regardless of the underlying grid.
> 
> I have thought of using the cutter with a plane, but wouldn't that just 
> result in the same points/lines/cells again?
> 
> Does anyone know how to do this?
> Suggestions, keywords or examples will be greatly appreciated!
must be charma,
not long after I post the question to the list, I figure it out...
there must be some Murphys Law name for this!
although the solution is (I think) standard, it might interest some:
the core object is vtkProbeFilter, 
 * with SetSource set the vector field to use
 * with SetInput set points on which the vectors are to be 
   interpolated from the source data
the homogenized pointfield can be created with the objects 
  vtkPlaneWidget, 
  vtkPolyData and 
  vtkTriangleFilter (if the vector field is from an unstructured grid) 
the output of the vtkProbeFilter is later used as the source vector field.
are there other/better ways of getting the same result?
There is a bit of memory waste I think, since if the source domain isn't 
a quadrilateral (a circle with a hole in it for example). Covering this 
with a planewidget could lead to actually having e.g. double as many 
points as needed. Is there a short way of cutting off all points 
and cells that aren't part of original domain?
thanks,
  tom
ps: the thread view of the mailing list looks broken....?
    
    
More information about the vtkusers
mailing list