Class Lattice2D.PolygonBasis

java.lang.Object
  |
  +--Lattice2D.PolygonBasis
Enclosing class:
Lattice2D

public class Lattice2D.PolygonBasis
extends java.lang.Object
implements Lattice2D.Basis

Polygon-based implementation of a basis


Field Summary
(package private)  int[] x
           
(package private)  int[] y
           
 
Constructor Summary
Lattice2D.PolygonBasis(int nPoints, int r)
          Creates a new polygon basis.
Lattice2D.PolygonBasis(int nPoints, int r, double rotation)
          Creates a new polygon basis.
 
Method Summary
 void paint(java.awt.Graphics g, int cx, int cy)
          Requests that the basis paint itself
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

x

int[] x

y

int[] y
Constructor Detail

Lattice2D.PolygonBasis

public Lattice2D.PolygonBasis(int nPoints,
                              int r,
                              double rotation)
Creates a new polygon basis. Points are distributed as nth (complex) roots of unity, then scaled and rotated as appropriate.
Parameters:
nPoints - The number of points
r - The distance of each point from the centre
rotation - A rotating factor

Lattice2D.PolygonBasis

public Lattice2D.PolygonBasis(int nPoints,
                              int r)
Creates a new polygon basis. Points are distributed as nth (complex) roots of unity, then scaled as appropriate.
Parameters:
nPoints - The number of points
r - The distance of each point from the centre
Method Detail

paint

public void paint(java.awt.Graphics g,
                  int cx,
                  int cy)
Description copied from interface: Lattice2D.Basis
Requests that the basis paint itself
Specified by:
paint in interface Lattice2D.Basis
Tags copied from interface: Lattice2D.Basis
Parameters:
g - The Graphics surface on which to paint
cx - The x coordinate (in pixels) at which the basis should be painted
cy - The y coordinate (in pixels) at which the basis should be painted