PeriodicPlanarMeshGrid
Quick facts | |
---|---|
Grid | PeriodicPlanarMeshGrid |
CellType | NGonCellType* |
CellDir | CellDir* |
CellRotation | CellRotation* |
Bound | SquareBound |
Properties | 2d, Planar, Repeating, Infinite |
*NGonCellType represents any polygon. But for 4 and 6 sided faces, the values overlap with SquareCellType and HexCellType, and the corresponding SquareDir, SquareRotation, PTHexDir, HexRotation. |
PeriodicPlanarMeshGrid is a variant of MeshGrid which takes that finite grid, and repeats it translated at fixed intervals to fill the infinite plane. It only supports planar meshes (those where all vertices have z=0).
To construct a PeriodicPlanarMeshGrid, you need to supply a planar mesh, and two stride vectors, which show how much to translate the mesh by to line it up with itself.
This grid comes with several built in subclasses to demonstrate some common tilings.
Input mesh | Result | Class |
---|---|---|
Cairo Grid | ||
TriHex Grid | ||
MetaHexagon Grid | ||
SquareSnub Grid | ||
TetrakisSquare Grid | ||
Rhombille Grid |
Note
Unlike mathematical tilings, this grid doesn't support doing any rotations of the input mesh, it only slides. You may need the input mesh to have multiple copies of each tile at different rotations in order to handle this.
Cell co-ordinates
The x value indicates the face in the mesh, and the y and z values indicate the multiple of stride moved in the two directions.