Class OrthonormalTessellator
- java.lang.Object
-
- org.jzy3d.plot3d.builder.Tessellator
-
- org.jzy3d.plot3d.builder.concrete.OrthonormalTessellator
-
- Direct Known Subclasses:
OldRingTesselator
,RingExtrapolator
,RingInterpolator
,RingTessellator
public class OrthonormalTessellator extends Tessellator
TheOrthonormalTessellator
checks that coordinates are lying on an orthormal grid, and is able to provide aComposite
made ofPolygon
s built according to this grid On this model, one input coordinate is represented by onePolygon
, for which each point is a mean point between two grid ticks:^ ^ | | - + + + - + + + | | *---* - + o + >> - + | o | + | | *---* - + + + - + + + | | |---|---|---|--> |---|---|---|-->
- Author:
- Martin Pernollet
-
-
Constructor Summary
Constructors Constructor Description OrthonormalTessellator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Composite
build(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)
List<Drawable>
getSquarePolygonsAroundCoordinates()
List<Drawable>
getSquarePolygonsAroundCoordinates(ColorMapper cmap, Color colorFactor)
List<Drawable>
getSquarePolygonsOnCoordinates()
List<Drawable>
getSquarePolygonsOnCoordinates(ColorMapper cmap, Color colorFactor)
protected Drawable
newQuad(Point[] p)
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
validZ(Point p)
protected boolean
validZ(Point[] points)
-
Methods inherited from class org.jzy3d.plot3d.builder.Tessellator
build
-
-
-
-
Method Detail
-
build
public Composite build(float[] x, float[] y, float[] z)
- 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
public List<Drawable> getSquarePolygonsOnCoordinates(ColorMapper cmap, Color colorFactor)
-
getSquarePolygonsAroundCoordinates
public List<Drawable> getSquarePolygonsAroundCoordinates(ColorMapper cmap, Color colorFactor)
-
getRealQuadStandingOnPoint
protected Point[] getRealQuadStandingOnPoint(int xi, int yi)
-
getEstimatedQuadSurroundingPoint
protected Point[] getEstimatedQuadSurroundingPoint(int xi, int yi)
-
validZ
protected boolean validZ(Point[] points)
-
validZ
protected boolean validZ(Point p)
-
-