<div class="gmail_quote">On Wed, Jan 20, 2010 at 11:30 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="gmail_quote"><div class="im">On Tue, Jan 19, 2010 at 7:02 PM, Kenneth Porter <span dir="ltr"><<a href="mailto:shiva@sewingwitch.com" target="_blank">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><br>
</div><div><br></div></div></blockquote><div><br></div></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" target="_blank">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>
</blockquote></div><div><br></div>Ah, I believe this is a perfect demo of vtkProbeFilter (that I've been looking for for a while now). I've updated the example, but it still doesn't work - if you can figure out how to get the data out of the probe you should be good to go. Please let us know if you do.<br>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain</a></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/InterpolateTerrain" target="_blank"></a><br clear="all">
Thanks,<br><br>David<br></div>