[vtkusers] interpolation
Oliver Gloth
oliver.gloth at engits.com
Fri Apr 25 02:33:19 EDT 2008
I was more thinking of the technical (programming) side of the problem. How
do I find the cell? Is vtkCellLocator the right tool for the job? Does its
method "FindClosestPoint(double[3], double[3], vtkIdType&, int&, double&)"
return the cellId of the cell that contains my position (x,y,z)?
Next question: Is there a standardised method to compute the weights for
interpolation within a cell? I can write it myself, but somehow I am almost
certain that it must exist already. Sorry if this question seems daft, but I
have been looking in the docs and book and couldn't really come up with a
solution yet.
Thanks,
Oliver
________________________________________
From: Marie-Gabrielle Vallet [mailto:mgv.research at gmail.com]
Sent: 24 April 2008 21:01
To: oliver.gloth at engits.com
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] interpolation
Oliver,
it depends what you mean by the best way...
Piecewise linear interpolation is continuous, and not expensive once you
know which cell the point belongs to.
The attribute of a point (x,y,z) included in a grid cell is the weighted
average of cell node attributes. The weight associated to a node i is the
relative volume of the virtual cell obtained after changing i for the point
location.
Marie-Gabrielle Vallet
> Date: Thu, 24 Apr 2008 13:45:44 +0200
> From: "Oliver Gloth" <oliver.gloth at engits.com>
> Subject: [vtkusers] interpolation
> To: "'vtkusers'" <vtkusers at vtk.org>
> Message-ID: <005901c8a600$bada5220$0b01a8c0 at cod>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello,
>
> What would be the best way to interpolate attributes of a
> vtkUnstructuredGrid? I have a given point (x,y,z) which is not a node of
the
> grid and I want to interpolate the values of point attributes for this
> position.
>
> It is not a visualisation task -- I am rather "abusing" the VTK data
> structures for unstructured mesh generation.
>
> Thanks,
> Oliver
More information about the vtkusers
mailing list