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

Variable Index

 o cells
Vector of cells that the contour passes through.
 o curve
Array that holds the points of the contour
 o grid
Array holding the data grid.
 o nx
X Dimension of data grid
 o ny
Y Dimension of data grid
 o size
Number of points in the contour
 o value
Contour value to be found

Constructor Index

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

Method Index

 o addDataPoint(double, double)
Add a data point to the contour curve.
 o addDataPoint(int, int, int)
Add a data point to the contour curve.
 o createCells()
Create the vector of all cells that contain the contour.
 o getcurve()
Traverse the cells and find One connect countour.
 o getCurve()
Return a contour curve.
 o getPoint(int, int, int)
Return the (x,y) position where the contour cross the cell wall.
 o search(int, int)
Search for a cell in the contour cell list
 o setGrid(double[], int, int)
Set the grid to be contoured
 o setValue(double)
Set the value to contour

Variables

 o cells
  protected Vector cells
Vector of cells that the contour passes through.
 o grid
  protected double grid[]
Array holding the data grid.
 o nx
  protected int nx
X Dimension of data grid
 o ny
  protected int ny
Y Dimension of data grid
 o curve
  protected double curve[]
Array that holds the points of the contour
 o size
  protected int size
Number of points in the contour
 o value
  protected double value
Contour value to be found

Constructors

 o IsoCurve
  public IsoCurve()
Instantiate the class and initialize all the variables
 o 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.

Methods

 o 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.
 o setValue
  public void setValue(double value)
Set the value to contour
Parameters:
value - the contour level
 o 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.
 o createCells
  protected void createCells()
Create the vector of all cells that contain the contour.
 o getcurve
  protected void getcurve()
Traverse the cells and find One connect countour.
 o 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.
 o 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.
 o 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.
 o 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