Re: Newbie: Simple surface plot

Hi Sindre,

> I downloaded VisAD a couple of days ago, and I must say I was really
> impressed, in particular by the performance.
> 
> Now to the question;  I want to draw a surface through a set of points
> in R3, say 
> 
> 10, 100, 23
> 10, 110, 54
> 10, 120, 65
> 20, 100, 69
> 20, 110, 32
> 20, 120, 25
> ... etc
> 
> Furthermore, I want the scale to display the "real" X, Y, Z values.
> 
> What's the easiest way to do this?

The easiest way is to construct a Set with domain dimension = 3
and manifold dimension = 2 (so it will define a surface).  If the
points lie on a gridded topology, use a Gridded3DSet with the
constructor:

  public Gridded3DSet(MathType type, float[][] samples, int lengthX,
                      int lengthY) throws VisADException;

where samples = new float[3][number_of_points] with
samples[0][0] = 10, samples[1][0] = 100, samples[2][0] = 23,
samples[0][1] = 10, samples[1][1] = 110, samples[2][1] = 54,
etc
and number_of_points = lengthX * lengthY describes the 2-D grid
topology.

If the points do not lie on a gridded topology, use an
Irregular3DSet with the constructor:

  public Irregular3DSet(MathType type, float[][] samples,
                      CoordinateSystem coord_sys, Unit[] units,
                      ErrorEstimate[] errors, Delaunay delan)
                                         throws VisADException;

where delan is a DelaunayCustom where you define an irregular
topology of triangles embedded in 3-D space.

This can be a little complex, especially if you use Irregular3DSet
and DelaunayCustom, so please feel free to follow up with more
questions.

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: