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
The OrthonormalTessellator checks that coordinates are lying on an orthormal grid, and is able to provide a Composite 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 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

      public Composite 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<Drawable> getSquarePolygonsOnCoordinates()
    • getSquarePolygonsAroundCoordinates

      public List<Drawable> getSquarePolygonsAroundCoordinates()
    • 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)
    • newQuad

      protected Drawable newQuad(Point[] p)