|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.chart.AbstractChartNode com.imsl.chart3d.ChartNode3D com.imsl.chart3d.Data com.imsl.chart3d.Surface
public class Surface
Surface from a function or from a set of scattered data points.
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
public static final int SURFACE_TYPE_FLAT
In a flat shaded surface, each polygon has a uniform color.
public static final int SURFACE_TYPE_GOURAUD
public static final int SURFACE_TYPE_MESH
public static final int SURFACE_TYPE_NICEST
Constructor Detail |
---|
public Surface(AxisXYZ parent, double[] x, double[] y, double[] z)
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.
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.public Surface(AxisXYZ parent, double[] x, double[] y, double[][] z)
z[i][j]
is the z-value at
(x[i]
, y[j]
).
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
.public Surface(AxisXYZ parent, double[] x, double[] y, double[][] z, Color[][] color)
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]
).
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
.public Surface(AxisXYZ parent, double[] x, double[] y, double[] z, Color[] color)
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.
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.public Surface(AxisXYZ parent, Surface.ZFunction zFunction, double xmin, double xmax, double ymin, double ymax)
parent
- an AxisXYZ object, the parent of this node.zFunction
- the function, .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 |
---|
protected void addToSceneGraph(Group parent)
ChartNode3D
addToSceneGraph
in class Data
parent
- is the node in the scene graph at which this
object is to be added.public void dataRange(double[] 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.
dataRange
in class Data
range
- a double
array which contains the updated
range, {xmin,xmax,ymin,ymax}public int getNumberGridPointsX()
This is the grid points in the x-direction for surfaces defined by a function.
public int getNumberGridPointsY()
This is the grid points in the y-direction for surfaces defined by a function.
public int getSurfaceType()
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
.SURFACE_TYPE_MESH
,
SURFACE_TYPE_FLAT
,
SURFACE_TYPE_GOURAUD
,
SURFACE_TYPE_NICEST
public void setNumberGridPointsX(int nx)
This is the grid points in the x-direction for surfaces defined by a function.
nx
- The number of grid points in the x-direction.
Default is 40.public void setNumberGridPointsY(int ny)
This is the grid points in the y-direction for surfaces defined by a function.
ny
- The number of grid points in the y-direction.
Default is 40.public void setSurfaceType(int surfaceType)
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.SURFACE_TYPE_MESH
,
SURFACE_TYPE_FLAT
,
SURFACE_TYPE_GOURAUD
,
SURFACE_TYPE_NICEST
|
JMSLTM Numerical Library 5.0.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |