org.jzy3d.plot3d.builder.concrete
Class OrthonormalTessellator

java.lang.Object
  extended by org.jzy3d.plot3d.builder.Tessellator
      extended by org.jzy3d.plot3d.builder.concrete.OrthonormalTessellator
Direct Known Subclasses:
OldRingTesselator, RingExtrapolator, RingTessellator

public class OrthonormalTessellator
extends Tessellator

The OrthonormalTessellator checks that coordinates are lying on an orthormal grid, and is able to provide a AbstractComposite made of Polygons 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
protected  int findxi
           
protected  int findyj
           
protected  float[] x
           
protected  float[] y
           
protected  float[][] z
           
 
Constructor Summary
OrthonormalTessellator()
           
 
Method Summary
 AbstractComposite 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<Polygon> getSquarePolygonsAroundCoordinates()
           
 List<Polygon> getSquarePolygonsAroundCoordinates(ColorMapper cmap, Color colorFactor)
           
 List<Polygon> getSquarePolygonsOnCoordinates()
           
 List<Polygon> getSquarePolygonsOnCoordinates(ColorMapper cmap, Color colorFactor)
           
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected float[] x

y

protected float[] y

z

protected float[][] z

findxi

protected int findxi

findyj

protected int findyj
Constructor Detail

OrthonormalTessellator

public OrthonormalTessellator()
Method Detail

build

public AbstractComposite build(float[] x,
                               float[] y,
                               float[] z)
Specified by:
build in class Tessellator

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 coordinates
y - list of y coordinates
z - 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<Polygon> getSquarePolygonsOnCoordinates()

getSquarePolygonsAroundCoordinates

public List<Polygon> getSquarePolygonsAroundCoordinates()

getSquarePolygonsOnCoordinates

public List<Polygon> getSquarePolygonsOnCoordinates(ColorMapper cmap,
                                                    Color colorFactor)

getSquarePolygonsAroundCoordinates

public List<Polygon> 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)