How to display block data?

Bill Hibbard hiding at japan.com
Thu Jan 4 04:44:25 MST 2007


 Hi Lizhi,

The easy way to display a Gridded2DSet as solid color squares is using
texture mapping, but VisAD's real purpose for using texture mapping is
as an approximation to increase rendering speed. It puts the centers of
squares at sample locations, so border squares have their centers on
the border and the half of the square beyond the border is clipped off.
Furthermore, VisAD under-samples the array of sample locations (the
default is to undersample by a factor of 10 in both X and Y directions),
so you do not see only approximate locations for squares. You may be
able to improve this by calling:

GraphicsModeControl mode = display.getGraphicsModeControl();
mode.setCurvedSize(1);

However, this may still not be as precise as you want. The other option
is to represent each colored square explicitly by its own Gridded2DSet
(or Linear2DSet) with size 2 x 2.

On your question about mouse buttons, the default for BUTTON3
is direct manipulation, not nothing. You can use the function
MouseHelper.setFunctionMap() to alter the default meanings of
mouse buttons. See visad/examples/Text00.java for an example
of how to use this.

Good luck,
Bill

  What I want is to display the block's width and height with the
  value DX[i] and DY[j] one by one. But when I used the Gridded2DSet,
  it seems that the block's width and height is not equals to the
  DX[i] and DY[j]. I don't know how the Gridded2DSet discript the
  block's width and height, or my array DX and DY is not used and
  only used the summation of DX and DY?

  Another question:
  How can I zoom in/out the display? Now the default event of
  dragged mouse is: BUTTON1 move the display, BUTTON2 give the
  position's lat/lon, BUTTON3 do nothing. How can I change this event?

  thanks

  lizhi

  ----- Original Message -----
  From: "Jim Koutsovasilis"
  To: "Wang Lizhi"
  Cc:
  Sent: Thursday, January 04, 2007 11:15 AM
  Subject: RE: How to display block data?


  Hello Lizhi,

  just some quick notes related to your problem.

  Did you want to change your display to a parallel projection
  instead of a (default) perspective projection? You can do this by
  adding the call to GraphicsModeControl.setProjectionPolicy() as
  follows:

  > DisplayImplJ3D display = new DisplayImplJ3D( "Display" );
  > GraphicsModeControl dispGMC =
  > (GraphicsModeControl)display.getGraphicsModeControl();
  > dispGMC.setScaleEnable( true );
  + dispGMC.setProjectionPolicy(DisplayImplJ3D.PARALLEL_PROJECTION);

  After this, you'll notice that the 'white box' which surrounds your
  data will be displayed as a rectangle, rather than a cube.

  To turn the 'box' off, you can use:

  + DisplayRenderer displayRenderer = display.getDisplayRenderer();
  + displayRenderer.setBoxOn(false);

  Regards,
  Jim.

  ---
  Jim Koutsovasilis
  Australian Bureau of Meteorology


  -----Original Message-----
  From: owner-visad at unidata.ucar.edu on behalf of Wang Lizhi
  Sent: Thu 4/01/2007 12:11 PM
  To: visad at unidata.ucar.edu
  Subject: How to display block data?

  Hi,

  I'm confused by the Gridded2DSet. I don't know how to use visad to
  display the blocks.
  My block data is very simple: NX = 3, with DX[3] = { 2, 3, 2 },
  NY=2 with DY[2]={2,1}. I think the picture should be the first pic
  at the website http://wlz.tea.ac.cn/study/visad/3d-1.htm , but when
  I use the visad with Gridded2DSet, I get the second pic. How can I
  draw the data?

  thanks

  lizhi


  ========================
=========================
=========================
=====
  To unsubscribe visad, visit:
  http://www.unidata.ucar.edu/mailing-list-delete-form.html
  ========================
=========================
=========================
=====


  ========================
=========================
=========================
=====
  To unsubscribe visad, visit:
  http://www.unidata.ucar.edu/mailing-list-delete-form.html
  ========================
=========================
=========================
=====

-- 
Low Prices, Wide Selection of Gas Masks
Everyday low price guarantee. We offer special police discounts and an extr
emely wide selection of gas masks, filters and huge selection of preparedne
ss gear.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=24e08df2353d2e6cb9bae
3a0e3c8c61e

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://mailman.unidata.ucar.edu/mailing_lists/archives/visad/attachments/20070104/9fbb8773/attachment.ksh 


More information about the visad mailing list