Re: Combining points with lines in 2D display

Hi Ugo,
 
> Could someone tell me how I can combine points with lines in a 2D
> display? I mean, if that's possible...
 
You can arrange this.  For the lines, create a Set(x, y) with
manifild dimension = 1 (e.g., a UnionSet of Gridded2DSets with
manifold dimension = 1), and with the mappings x -> XAxis and
y -> YAxis.  For the points, create a FlatField with type
(index -> (x, y)).
 
> I have also noticed that it is possible to have different scales
> on the same 2D display, but only using a display like
>
> displayN =  new DisplayImplJ3D("displayN", new
> TwoDDisplayRendererJ3D());
>
> (as done in the GoesCollaboration application), and not an ordinary
> DisplayImplJ2D. Could someone clarify this issue?
 
Actually, the multiple scales in GoesCollaboration come
because multiple RealTypes (temp, mixr, ozone & pressure)
are mapped to Display.XAxis in display2.  This will work
with any DisplayImpl (J3D or J2D).
 
> I have combined this two types of displays in the same application,
> and all works fine, except for the aspect ratio. The two display
> types do not seem to accept the same numerical value for the aspect.
> I set the aspect of a 2D display with
>
> double[] asp2d = {2.0, 1.25};
> ProjectionControl pcontrol = display1.getProjectionControl();
> pcontrol.setAspect(asp2d);
>
> but calling this function for a TwoDDisplayRendererJ3D (and doing
> double[] asp2d = {2.0, 1.25, 1.0}) may set the same aspect ratio, but
> makes the display somewhat larger (than the others DisplayImplJ2D).
 
We have tried to get Java2D and Java3D displays to scale similarly,
but sometimes AWT and Swing do things that frankly we do not always
understand.  The best I can suggest is fiddle with the setAspect()
of all the displays until they look the way you like.
 
Cheers,
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



  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: