<div><div class="gmail_quote">On Tue, Jan 19, 2010 at 7:02 PM, Kenneth Porter <span dir="ltr"><<a href="mailto:shiva@sewingwitch.com">shiva@sewingwitch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
--On Tuesday, January 19, 2010 1:21 AM -0500 Darshan Pai <<a href="mailto:darshanpai@gmail.com" target="_blank">darshanpai@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am not exactly sure what you are asking .<br>
maybe you can try the FindPoint() function in vtkPolyData....<br>
</blockquote>
<br>
Imagine that I'm given a topo map and know latitude and longitude, and need to calculate the altitude.<br>
<br>
It looks like FindCell might do what I need:<br>
<br>
<<a href="http://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a2221c10d3c4cca44e82c5ef70e4e1cbd" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a2221c10d3c4cca44e82c5ef70e4e1cbd</a>><br>
<br>
I need to find the triangle that contains an X/Y point, where the Z is unknown, so that I can compute the Z.<div><div></div><div class="h5"><br>
</div><div class="h5"><br></div></div></blockquote><div><br></div><div>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.</div>
<div><br></div><div>I tried to make a demo here:</div><a href="http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain">http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain</a><div><br></div><div>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)?</div>
<div><br clear="all">Thanks,<br><br></div><div>David</div></div></div>