Re: adding a single point that stands out to a surface plot

bill,

thanks for the quick response.

i guess now i am having a hard time figuring out where the actual x,y,z
values go for the point i want to add.

do i use a FlatField(FunctionType) to create a flatfield and put the
samples in there by setSamples(float[3][1], false) where

 float[3][1] = { {x}, {y}, {z} }

?

then i set the data of the datareference to that flatfield?

thanks for your help,

-Mike


On Thu, 2002-08-01 at 17:12, Bill Hibbard wrote:
> Hi Mike,
> 
> > i created a simple program to take a list of (x,y,z) points and put them
> > on a 3D surface plot with the domain (x,y) and the range z, or
> > FunctionType:
> >
> >  (x,y) -> z
> >
> > this program does this by using a Irregular2DSet as the domain, a
> > FlatField mapping the FunctionType to the domain, and a DataReference
> > mapping this FlatField to a DisplayImplJ3D.
> >
> > All I would like to do is add a simple way to this program that will put
> > a single point on the graph, with a larger size than the other points
> > and a color that stands out.
> >
> > I was curious what the easiest way to do this would be?
> >
> > I am confused about 2 things:
> >
> > how do I go about it without connecting that extra point in with the
> > rest of the surface plot?
> >
> > how could I have a single point, possibly with an (x,y) value that is
> > not in the current Irregular2DSet domain, be on the same plot.
> 
> The best way to do this is to add the new point in its
> own RealTuple object with MathType (x, y, z) linked to the
> DisplayImpl via its own DataReference. You can give the
> new lone points its own color and size by passing an array
> of appropriate ConstantMaps (i.e., to PointSize, Red, Green
> and Blue) with the call to DisplayImpl.addReference(). You
> can add any number of points this way.
> 
> As long as the MathType (x, y, z) uses the same RealTypes
> x, y and z as are used in your FunctionType ((x, y) -> z),
> the new point will be in the same coordinates.
> 
> Good luck,
> Bill



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