JMSLTM Numerical Library 5.0.1

com.imsl.chart3d
Class Surface

java.lang.Object
  extended by com.imsl.chart.AbstractChartNode
      extended by com.imsl.chart3d.ChartNode3D
          extended by com.imsl.chart3d.Data
              extended by com.imsl.chart3d.Surface
All Implemented Interfaces:
Serializable, Cloneable

public class Surface
extends Data
implements Serializable

Surface from a function or from a set of scattered data points.

See Also:
Example, Example, Serialized Form

Nested Class Summary
static interface Surface.ZFunction
          Functional representation of a surface.
 
Nested classes/interfaces inherited from class com.imsl.chart3d.Data
Data.CustomMarkerFactory
 
Field Summary
static long serialVersionUID
           
static int SURFACE_TYPE_FLAT
          Draws the surface using flat shading.
static int SURFACE_TYPE_GOURAUD
          Draws the surface using Gouraud shading.
static int SURFACE_TYPE_MESH
          Draws the surface as a mesh.
static int SURFACE_TYPE_NICEST
          Draws the surface using the best shading available.
 
Fields inherited from class com.imsl.chart3d.ChartNode3D
AXIS_TITLE_AT_END, AXIS_TITLE_PARALLEL, DATA_TYPE_LINE, DATA_TYPE_MARKER, DATA_TYPE_PICTURE, DATA_TYPE_TUBE, MARKER_TYPE_CUBE, MARKER_TYPE_CUSTOM, MARKER_TYPE_PLUS, MARKER_TYPE_SIMPLE_CUBE, MARKER_TYPE_SIMPLE_PLUS, MARKER_TYPE_SIMPLE_TETRAHEDRON, MARKER_TYPE_SPHERE, MARKER_TYPE_TETRAHEDRON
 
Fields inherited from class com.imsl.chart.AbstractChartNode
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG
 
Constructor Summary
Surface(AxisXYZ parent, double[] x, double[] y, double[] z)
          Creates a surface from a scattered set of 3D points.
Surface(AxisXYZ parent, double[] x, double[] y, double[][] z)
          Creates a surface from a gridded data set.
Surface(AxisXYZ parent, double[] x, double[] y, double[][] z, Color[][] color)
          Creates a colored surface from a gridded data set.
Surface(AxisXYZ parent, double[] x, double[] y, double[] z, Color[] color)
          Creates a surface from a scattered set of 3D points with a color given at each point.
Surface(AxisXYZ parent, Surface.ZFunction zFunction, double xmin, double xmax, double ymin, double ymax)
          Creates a surface from a function.
 
Method Summary
protected  void addToSceneGraph(Group parent)
          Called to add this object to the scene graph.
 void dataRange(double[] range)
          Update the data range, range = {xmin,xmax,ymin,ymax}.
 int getNumberGridPointsX()
          Returns the value of the "NumberGridPointsX" attribute.
 int getNumberGridPointsY()
          Returns the value of the "NumberGridPointsY" attribute.
 int getSurfaceType()
          Returns the attribute "SurfaceType".
 void setNumberGridPointsX(int nx)
          Sets the value of the "NumberGridPointsX" attribute.
 void setNumberGridPointsY(int ny)
          Sets the value of the "NumberGridPointsY" attribute.
 void setSurfaceType(int surfaceType)
          Sets the attribute "SurfaceType".
 
Methods inherited from class com.imsl.chart3d.Data
getCustomMarkerFactory, setCustomMarker, update
 
Methods inherited from class com.imsl.chart3d.ChartNode3D
getAxisTitlePosition, getBoundingSphere, getChildren, getColorFunction, getConcatenatedViewport, getDataType, getLightingEnabled, getMarkerPulsingCycle, getMarkerPulsingCycleOffset, getMarkerPulsingMaximumScale, getMarkerPulsingMinimumScale, getMarkerRotatingAxis, getMarkerRotatingCycle, getMarkerRotatingCycleOffset, getMarkerType, getMaterial, getParent, getTitle, getViewport, getVirtualUniverse, getZ, setAxisTitlePosition, setBoundingSphere, setColorFunction, setDataType, setLightingEnabled, setMarkerPulsingCycle, setMarkerPulsingCycleOffset, setMarkerPulsingMaximumScale, setMarkerPulsingMinimumScale, setMarkerRotatingAxis, setMarkerRotatingCycle, setMarkerRotatingCycleOffset, setMarkerType, setMaterial, setTitle, setViewport, setViewport, setZ
 
Methods inherited from class com.imsl.chart.AbstractChartNode
clone, clone, clone, clone, getAbstractParent, getAttribute, getAutoscaleInput, getAutoscaleMinimumTimeInterval, getAutoscaleOutput, getBooleanAttribute, getChildList, getColorAttribute, getCustomTransform, getDensity, getDoubleAttribute, getFillColor, getFont, getFontName, getFontSize, getFontStyle, getImage, getIntegerAttribute, getLabelType, getLightColor, getLineColor, getLineWidth, getLocale, getMarkerColor, getMarkerSize, getName, getNumber, getPaint, getStringAttribute, getTextColor, getTextFormat, getTickLength, getTransform, getX, getY, isAncestorOf, isAttributeSet, isAttributeSetAtThisNode, isBitSet, parseColor, remove, setAttribute, setAutoscaleInput, setAutoscaleMinimumTimeInterval, setAutoscaleOutput, setCustomTransform, setDensity, setFillColor, setFillColor, setFont, setFontName, setFontSize, setFontStyle, setImage, setLabelType, setLightColor, setLightColor, setLineColor, setLineColor, setLineWidth, setLocale, setMarkerColor, setMarkerColor, setMarkerSize, setName, setNumber, setPaint, setTextColor, setTextColor, setTextFormat, setTextFormat, setTickLength, setTransform, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

SURFACE_TYPE_FLAT

public static final int SURFACE_TYPE_FLAT
Draws the surface using flat shading.

In a flat shaded surface, each polygon has a uniform color.

See Also:
Constant Field Values

SURFACE_TYPE_GOURAUD

public static final int SURFACE_TYPE_GOURAUD
Draws the surface using Gouraud shading. In a Gouraud shaded surface, colors are interpolated across each polygon.

See Also:
Constant Field Values

SURFACE_TYPE_MESH

public static final int SURFACE_TYPE_MESH
Draws the surface as a mesh.

See Also:
Constant Field Values

SURFACE_TYPE_NICEST

public static final int SURFACE_TYPE_NICEST
Draws the surface using the best shading available.

See Also:
Constant Field Values
Constructor Detail

Surface

public Surface(AxisXYZ parent,
               double[] x,
               double[] y,
               double[] z)
Creates a surface from a scattered set of 3D points.

A surface is created from a scattered set of points. A function is interpolated to the given point over the rectangular area determined by that point's ranges.

Parameters:
parent - an AxisXYZ object, the parent of this node.
x - is the array of x values.
y - is the array of y values.
z - is the array of z values.

Surface

public Surface(AxisXYZ parent,
               double[] x,
               double[] y,
               double[][] z)
Creates a surface from a gridded data set. A surface is created from a grid of points in a rectangular area. The point z[i][j] is the z-value at (x[i], y[j]).

Parameters:
parent - an AxisXYZ object, the parent of this node.
x - is the array of x values.
y - is the array of y values.
z - is the two-dimensional array of z values of size x.length by y.length.

Surface

public Surface(AxisXYZ parent,
               double[] x,
               double[] y,
               double[][] z,
               Color[][] color)
Creates a colored surface from a gridded data set.

A surface is created from a grid of points in a rectangular area. The point z[i][j] is the z-value at (x[i], y[j]).

Parameters:
parent - an AxisXYZ object, the parent of this node.
x - is the array of x values.
y - is the array of y values.
z - is the two-dimensional array of z values.
color - is the two-dimensional array of color values. The array must have the same size as the array z.

Surface

public Surface(AxisXYZ parent,
               double[] x,
               double[] y,
               double[] z,
               Color[] color)
Creates a surface from a scattered set of 3D points with a color given at each point.

A surface is created from a scattered set of points. A function is interpolated to the given point over the rectangular area determined by that point's ranges.

Parameters:
parent - an AxisXYZ object, the parent of this node.
x - is the array of x values.
y - is the array of y values.
z - is the array of z values.
color - is array of color values at each point.

Surface

public Surface(AxisXYZ parent,
               Surface.ZFunction zFunction,
               double xmin,
               double xmax,
               double ymin,
               double ymax)
Creates a surface from a function. A surface is created by evaluation of the function on a grid of points in a rectangular area, [xmin,xmax] by [ymin,ymax], of the xy-plane.

Parameters:
parent - an AxisXYZ object, the parent of this node.
zFunction - the function, z = f(x,y).
xmin - the minimum x-value of the function rectangle.
xmax - the maximum x-value of the function rectangle.
ymin - the minimum y-value of the function rectangle.
ymax - the maximum y-value of the function rectangle.
Method Detail

addToSceneGraph

protected void addToSceneGraph(Group parent)
Description copied from class: ChartNode3D
Called to add this object to the scene graph.

Overrides:
addToSceneGraph in class Data
Parameters:
parent - is the node in the scene graph at which this object is to be added.

dataRange

public void dataRange(double[] range)
Update the data range, range = {xmin,xmax,ymin,ymax}. The entries in range are updated to reflect the extent of the data in this node. The argument range is an input/output variable. Its value should be updated only if the data in this node is outside the range already in the array.

Overrides:
dataRange in class Data
Parameters:
range - a double array which contains the updated range, {xmin,xmax,ymin,ymax}

getNumberGridPointsX

public int getNumberGridPointsX()
Returns the value of the "NumberGridPointsX" attribute.

This is the grid points in the x-direction for surfaces defined by a function.

Returns:
The number of grid points in the x-direction. Default is 40.

getNumberGridPointsY

public int getNumberGridPointsY()
Returns the value of the "NumberGridPointsY" attribute.

This is the grid points in the y-direction for surfaces defined by a function.

Returns:
The number of grid points in the y-direction. Default is 40.

getSurfaceType

public int getSurfaceType()
Returns the attribute "SurfaceType".

Returns:
one of SURFACE_TYPE_MESH, SURFACE_TYPE_FLAT, SURFACE_TYPE_GOURAUD, SURFACE_TYPE_NICEST or SURFACE_TYPE_MESH or-ed with one of the other types. Default value is SURFACE_TYPE_NICEST.
See Also:
SURFACE_TYPE_MESH, SURFACE_TYPE_FLAT, SURFACE_TYPE_GOURAUD, SURFACE_TYPE_NICEST

setNumberGridPointsX

public void setNumberGridPointsX(int nx)
Sets the value of the "NumberGridPointsX" attribute.

This is the grid points in the x-direction for surfaces defined by a function.

Parameters:
nx - The number of grid points in the x-direction. Default is 40.

setNumberGridPointsY

public void setNumberGridPointsY(int ny)
Sets the value of the "NumberGridPointsY" attribute.

This is the grid points in the y-direction for surfaces defined by a function.

Parameters:
ny - The number of grid points in the y-direction. Default is 40.

setSurfaceType

public void setSurfaceType(int surfaceType)
Sets the attribute "SurfaceType".

Parameters:
surfaceType - is one of SURFACE_TYPE_MESH, SURFACE_TYPE_FLAT, SURFACE_TYPE_GOURAUD, SURFACE_TYPE_NICEST or SURFACE_TYPE_MESH or-ed with one of the other types.
See Also:
SURFACE_TYPE_MESH, SURFACE_TYPE_FLAT, SURFACE_TYPE_GOURAUD, SURFACE_TYPE_NICEST

JMSLTM Numerical Library 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.