Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Alpha Blending?

Kevin,

> Thanks for the reply, Bill.  I see what you are saying regarding
> ScalarMap vs. ConstantMap transparency.  However, perhaps I'm not so
> concerned with *varying* opacity.  The colored wedges that are in the
> example are Irregular2DSets (not a Field) and are only used to
> distinguish between one "wedge" (beamwidth) and the next.  I would like
> to illustrate the overlap between these wedges and hoped that by placing
> one on top of the other, the opacity (or colors) of the overlaping areas
> would be different than the individual wedge.
> . . .

You could try to make the geometry of each beam a little
wider so they overlap. That might give you the effect you
want.

> On a different topic, I am trying to use the addReferences(DataRenderer,
> DataReference[], ConstantMap[][]) method of the DisplayImpl class and
> have not been successful.
>
> Here is a snippet of my code:
> . . .
>      allBeamsRef = new DataReferenceImpl[NUM_ANGLES];
> . . .
>        allBeamsRef[i] = new DataReferenceImpl("allBeamsRef" + i);
> . . .
>      rhiDisplay.addReferences(allBeamsRend, allBeamsRef);
> . . .
> I get the following runtime error:
>
> Exception in thread "main" visad.DisplayException:
> DefaultRendererJ3D.setLinks: must be exactly one DataDisplayLink
>
> and the line number is associated with:
>
> rhiDisplay.addReferences(allBeamsRend, allBeamsRef);

For DefaultRendererJ3D, the array of DataReferences must
consist of exactly one DataReference. For what you want
to do, you must put the call to addReferences() inside
the loop, and pass only one DataReference at a time
(in a single length array if you like). The signature
allows multiple DataReferences for those custom
DataRenderers that can handle them.

Good luck,
Bill


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690