Class OrthonormalTessellator
java.lang.Object
org.jzy3d.plot3d.builder.Tessellator
org.jzy3d.plot3d.builder.concrete.OrthonormalTessellator
- Direct Known Subclasses:
OldRingTesselator
,RingExtrapolator
,RingInterpolator
,RingTessellator
The
OrthonormalTessellator
checks that coordinates are lying on an orthormal grid, and is
able to provide a Composite
made of Polygon
s built according to this grid
On this model, one input coordinate is represented by one Polygon
, for which each point
is a mean point between two grid ticks:
^ ^
| |
- + + + - + + +
| | *---*
- + o + >> - + | o | +
| | *---*
- + + + - + + +
| |
|---|---|---|--> |---|---|---|-->
In this figure, the representation of a coordinate ("o" on the left) is a polygon made of mean
points ("*" on the right) that require the existence of four surrounding points (the "o" and the
three "+")- Author:
- Martin Pernollet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild
(float[] x, float[] y, float[] z) protected boolean
find
(float[] x, float[] y, float vx, float vy) Search in a couple of array a combination of values vx and vy.protected Point[]
getEstimatedQuadSurroundingPoint
(int xi, int yi) protected Point[]
getRealQuadStandingOnPoint
(int xi, int yi) getSquarePolygonsAroundCoordinates
(ColorMapper cmap, Color colorFactor) getSquarePolygonsOnCoordinates
(ColorMapper cmap, Color colorFactor) protected Drawable
protected void
setData
(float[] x, float[] y, float[] z) Set the array of data.protected float[]
unique
(float[] data) Compute a sorted array from input, with a unique occurrence of each value.protected boolean
protected boolean
Methods inherited from class org.jzy3d.plot3d.builder.Tessellator
build
-
Field Details
-
x
protected float[] x -
y
protected float[] y -
z
protected float[][] z -
findxi
protected int findxi -
findyj
protected int findyj
-
-
Constructor Details
-
OrthonormalTessellator
public OrthonormalTessellator()
-
-
Method Details
-
build
- Specified by:
build
in classTessellator
-
setData
protected void setData(float[] x, float[] y, float[] z) Set the array of data. X,Y, and Z are arrays that must implicitely represent an orthonormal grid. If some data are missing for representing this grid, missing data will be considered as NaN. The actual management of missing values is thus left to the object that loads these data. In the following example, the o represent a NaN Z value, meaning that there was no (x[i],y[i],z[i]) triplet for representing it correctly:
11111111 y 11111111 11o11111 11111111 x
- Parameters:
x
- list of x coordinatesy
- list of y coordinatesz
- list of z coordinates- Throws:
an
- IllegalArgumentException if x, y , and z have not the same size
-
unique
protected float[] unique(float[] data) Compute a sorted array from input, with a unique occurrence of each value. Note: any NaN value will be ignored and won't appear in the output array.- Parameters:
data
- input array.- Returns:
- a sorted array containing only one occurrence of each input value.
-
find
protected boolean find(float[] x, float[] y, float vx, float vy) Search in a couple of array a combination of values vx and vy. Positions xi and yi are returned by reference. Function returns true if the couple of data may be retrieved, false otherwise (in this case, xi and yj remain unchanged). -
getSquarePolygonsOnCoordinates
-
getSquarePolygonsAroundCoordinates
-
getSquarePolygonsOnCoordinates
-
getSquarePolygonsAroundCoordinates
-
getRealQuadStandingOnPoint
-
getEstimatedQuadSurroundingPoint
-
validZ
-
validZ
-
newQuad
-