NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Helen, You may be able to do this by displaying your Field using visad/bom/PickManipulationRendererJ3D.java. See the main() method of that class for an example. Note the calls to PickManipulationRendererJ3D.getCloseIndex() that will give you the 'index' value of the point in your Field closest to your click. Then you can call eveluate(). Good luck, Bill ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html On Thu, 25 Apr 2002, Helen Yi wrote: > Hi, > > Refer to ViaAd Tutorial example P2_03, I have plot some points on my > display. > The FunctionType I used is > > (index ->(time, height, speed) ) > > func_i_tuple = new FunctionType( index, t_h_s_tuple); > > index_set = new Integer1DSet(index, 200); > > float[][] point_vals = new float[3][200]; > > vals_ff = new FlatField (func_i_tuple,index_set); > vals_ff.setSamples(point_vals); > > timeMap = new Scalarmap (time, Display.XAxis); > heightMap = new Scalarmap (height, Display.YAxis); > speedMap = new Scalarmap (speed, Display.RGB); > > Click on the left mouse button, the value of time and height at mouse > click will display at upper left corner of the display window. > But I also like to know the speed value( i.e. color of point) of the > point which is the most closest point to the mouse click point. > Since the speed is not the function of time and height, I don't think I > could use Function.evaluate() to interpolates the function at the given > location as shown in tutorial.s6.P6_02 or P6_03. > > > Thanks in advance for pointing me a direction to turn. > > > helen > > > >
visad
archives: