public class RandomSpaceFillingCurve extends Object
A space-filling curve is a continuous curve that traverses every point of an plane exactly once.
This class implements the technique described in "Context-based space filling curves" by Dafner et al, and is based on this javascript implementation by Claudio Esperança.
Constructor and Description |
---|
RandomSpaceFillingCurve(int ncols,
int nrows)
Instantiates a random space-filling curve.
|
RandomSpaceFillingCurve(int ncols,
int nrows,
long seed)
Instantiates a random space-filling curve, having a given random seed.
|
Modifier and Type | Method and Description |
---|---|
processing.core.PShape |
getCurve(float cellWidth,
float cellHeight) |
processing.core.PShape |
getSkeleton(float cellWidth,
float cellHeight) |
public RandomSpaceFillingCurve(int ncols, int nrows)
ncols
- number of cells in the x direction (columns)nrows
- number of cells in the y direction (rows)public RandomSpaceFillingCurve(int ncols, int nrows, long seed)
ncols
- number of cells in the x direction (columns)nrows
- number of cells in the y direction (rows)seed
- Copyright © 2023. All rights reserved.