Provide a grid data structure. Will resize up to include the full
range on the max size if not an interger size of stepSize. Units are
whatever you desire. It is up to you to project them.
0,0 is at the lower left and (xNumCells-1,yNumCells-1) is the upper
right cell
|
__init__(self,
minx,
miny,
maxx,
maxy,
stepSize,
gridType=' occurrence ' ,
verbose=False)
Prepare a grid. |
source code
|
|
|
|
|
getCell(self,
x,
y,
verbose=False)
Returns:
the i,j of the cell containing this coordinate |
source code
|
|
|
|
|
getLineCells2pt(self,
p1,
p2,
verbose=False) |
source code
|
|
|
getLineCellsWithCrossingsPts(self,
p1,
p2,
verbose=False) |
source code
|
|
|
|
|
getLineCells(self,
x0,
y0,
x1,
y1,
verbose=False)
Scan convert a single line segment with two vertices. |
source code
|
|
|
|
|
|
|
writeLayoutGnuplot(self,
filename)
Write out the grid lines as gnuplot dat file |
source code
|
|
|
addMultiSegLine(self,
multiSegLine,
verbose=False) |
source code
|
|
|
|
|
|