[vtkusers] Interpolating point on a surface

David Doria daviddoria+vtk at gmail.com
Wed Jan 20 11:30:29 EST 2010


On Tue, Jan 19, 2010 at 7:02 PM, Kenneth Porter <shiva at sewingwitch.com>wrote:

> --On Tuesday, January 19, 2010 1:21 AM -0500 Darshan Pai <
> darshanpai at gmail.com> wrote:
>
>  I am not exactly sure what you are asking .
>> maybe you can try the FindPoint() function in vtkPolyData....
>>
>
> Imagine that I'm given a topo map and know latitude and longitude, and need
> to calculate the altitude.
>
> It looks like FindCell might do what I need:
>
> <
> http://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a2221c10d3c4cca44e82c5ef70e4e1cbd
> >
>
> I need to find the triangle that contains an X/Y point, where the Z is
> unknown, so that I can compute the Z.
>
>
>
If you have a function of (x,y) (a terrain map), you are probably better off
interpolating on a 2D grid with the z values stored as scalars of the 2D
points.

I tried to make a demo here:
http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain

but the only interpolation class I know of, vtkShepardMethod, doesn't want
to let me sample at a single point. Anyone know how to, given a field of
points with scalars, interpolate the value at a specific point (x,y,z)?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100120/39c40b9d/attachment.htm>


More information about the vtkusers mailing list