Class graph.IsoCurve
All Packages Class Hierarchy This Package Previous Next Index
Class graph.IsoCurve
java.lang.Object

+graph.IsoCurve
 public class IsoCurve
 extends Object
This class will calculate the constant curve of a given value passing
through a grid of values.
 Version:
 1.6, 1996/07/30 04:52:40.
 Author:
 Leigh Brookshaw

cells
 Vector of cells that the contour passes through.

curve
 Array that holds the points of the contour

grid
 Array holding the data grid.

nx
 X Dimension of data grid

ny
 Y Dimension of data grid

size
 Number of points in the contour

value
 Contour value to be found

IsoCurve()
 Instantiate the class and initialize all the variables

IsoCurve(double[], int, int)
 Instantiate the class and initialize all the variables.

addDataPoint(double, double)
 Add a data point to the contour curve.

addDataPoint(int, int, int)
 Add a data point to the contour curve.

createCells()
 Create the vector of all cells that contain the contour.

getcurve()
 Traverse the cells and find One connect countour.

getCurve()
 Return a contour curve.

getPoint(int, int, int)
 Return the (x,y) position where the contour cross the cell wall.

search(int, int)
 Search for a cell in the contour cell list

setGrid(double[], int, int)
 Set the grid to be contoured

setValue(double)
 Set the value to contour
cells
protected Vector cells
 Vector of cells that the contour passes through.
grid
protected double grid[]
 Array holding the data grid.
nx
protected int nx
 X Dimension of data grid
ny
protected int ny
 Y Dimension of data grid
curve
protected double curve[]
 Array that holds the points of the contour
size
protected int size
 Number of points in the contour
value
protected double value
 Contour value to be found
IsoCurve
public IsoCurve()
 Instantiate the class and initialize all the variables
IsoCurve
public IsoCurve(double grid[],
int nx,
int ny)
 Instantiate the class and initialize all the variables.
 Parameters:
 grid  An nx by ny Array containing the grid to contour
 nx  X dimension of the grid.
 ny  Y dimension of the grid.
setGrid
public void setGrid(double grid[],
int nx,
int ny)
 Set the grid to be contoured
 Parameters:
 nx  X dimension of the grid.
 ny  Y dimension of the grid.
setValue
public void setValue(double value)
 Set the value to contour
 Parameters:
 value  the contour level
getCurve
public double[] getCurve()
 Return a contour curve. If null
is returned it means that all the contour curves have been found.
 Returns:
 The array containing the (x,y) pairs of the contour curve.
createCells
protected void createCells()
 Create the vector of all cells that contain the contour.
getcurve
protected void getcurve()
 Traverse the cells and find One connect countour.
getPoint
protected double[] getPoint(int wall,
int icell,
int jcell)
 Return the (x,y) position where the contour cross the cell wall.
 Parameters:
 wall  The cell wall the contour crosses.
 icell  The x index of the cell position.
 jcell  The y index of the cell position.
addDataPoint
protected void addDataPoint(int wall,
int icell,
int jcell)
 Add a data point to the contour curve.
 Parameters:
 wall  The cell wall the contour crosses.
 icell  The x index of the cell position.
 jcell  The y index of the cell position.
addDataPoint
protected void addDataPoint(double x,
double y)
 Add a data point to the contour curve.
 Parameters:
 x  The x position of the point.
 y  The y position of the point.
search
protected Cell search(int icell,
int jcell)
 Search for a cell in the contour cell list
 Parameters:
 icell  the x index of the cell
 jcell  the y index of the cell
All Packages Class Hierarchy This Package Previous Next Index