Class RingInterpolator


  • public class RingInterpolator
    extends org.jzy3d.plot3d.builder.concrete.OrthonormalTessellator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.jzy3d.colors.ColorMapper cmap  
      protected org.jzy3d.colors.Color factor  
      protected float ringMax  
      protected float ringMin  
      • Fields inherited from class org.jzy3d.plot3d.builder.concrete.OrthonormalTessellator

        findxi, findyj, x, y, z
    • Constructor Summary

      Constructors 
      Constructor Description
      RingInterpolator​(float ringMin, float ringMax, org.jzy3d.colors.ColorMapper cmap, org.jzy3d.colors.Color factor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.jzy3d.plot3d.primitives.Composite build​(float[] x, float[] y, float[] z)  
      List<org.jzy3d.plot3d.primitives.Polygon> getInterpolatedRingPolygons()
      Load data standing on an orthonormal grid.
      protected boolean[] isInside​(org.jzy3d.plot3d.primitives.Point[] p, float[] radius, float minRadius, float maxRadius)
      Indicates which point lies inside and outside the given min and max radius.
      protected float radius2d​(org.jzy3d.plot3d.primitives.Point p)  
      • Methods inherited from class org.jzy3d.plot3d.builder.concrete.OrthonormalTessellator

        find, getEstimatedQuadSurroundingPoint, getRealQuadStandingOnPoint, getSquarePolygonsAroundCoordinates, getSquarePolygonsAroundCoordinates, getSquarePolygonsOnCoordinates, getSquarePolygonsOnCoordinates, newQuad, setData, unique, validZ, validZ
      • Methods inherited from class org.jzy3d.plot3d.builder.Tessellator

        build
    • Field Detail

      • ringMin

        protected float ringMin
      • ringMax

        protected float ringMax
      • cmap

        protected org.jzy3d.colors.ColorMapper cmap
      • factor

        protected org.jzy3d.colors.Color factor
    • Constructor Detail

      • RingInterpolator

        public RingInterpolator​(float ringMin,
                                float ringMax,
                                org.jzy3d.colors.ColorMapper cmap,
                                org.jzy3d.colors.Color factor)
    • Method Detail

      • build

        public org.jzy3d.plot3d.primitives.Composite build​(float[] x,
                                                           float[] y,
                                                           float[] z)
        Overrides:
        build in class org.jzy3d.plot3d.builder.concrete.OrthonormalTessellator
      • getInterpolatedRingPolygons

        public List<org.jzy3d.plot3d.primitives.Polygon> getInterpolatedRingPolygons()
        Load data standing on an orthonormal grid.
        Each input point (i.e. the association of x[i], y[j], z[i][j]) will be represented by a polygon centered on this point. The default coordinates of this polygon will be:
        • x[i-1], y[j+1], z[i-1][j+1]
        • x[i-1], y[j-1], z[i-1][j-1]
        • x[i+1], y[j-1], z[i+1][j-1]
        • x[i+1], y[j+1], z[i+1][j+1]
        There are thus three types of polygons:
        • those that stand completely inside the ringMin and ringMax radius and that have the previous coordinates.
        • those that stand completely outside the ringMin and ringMax radius and that won't be added to the list of polygons.
        • those that have some points in and some points out of the ringMin and ringMax radius. These polygons are recomputed so that "out" points are replaced by two points that make the smooth contour. According to the number of "out" points, the modified polygon will gather 3, 4, or 5 points.
          As a consequence, it is suggested to provide data ranging outside of ringMin and ringMax, in order to be sure to have a perfect round surface.
        Parameters:
        ringMin - the minimum radius of this ring.
        ringMax - the maximum radius of this ring.
        colorFactor - a weighting factor for the color returned by the Colormap.
      • isInside

        protected boolean[] isInside​(org.jzy3d.plot3d.primitives.Point[] p,
                                     float[] radius,
                                     float minRadius,
                                     float maxRadius)
        Indicates which point lies inside and outside the given min and max radius.
      • radius2d

        protected float radius2d​(org.jzy3d.plot3d.primitives.Point p)