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

  • To: Mike Charters <mcharter@xxxxxxxxx>
  • Subject: Re: adding a single point that stands out to a surface plot
  • From: Bill Hibbard <billh@xxxxxxxxxxxxx>
  • Date: Thu, 1 Aug 2002 16:12:58 -0500 (CDT)
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: