Copyright | (c) Amy de Buitléir 2012-2014 |
---|---|
License | BSD-style |
Maintainer | amy@nualeargais.ie |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
A regular arrangement of triangular tiles.
The userguide, with illustrations, is available at
https://github.com/mhwombat/grid/wiki.
Also see Math.Geometry.Grid
for examples of how to use this class.
- data UnboundedTriGrid
- data TriTriGrid
- triTriGrid :: Int -> TriTriGrid
- data ParaTriGrid
- paraTriGrid :: Int -> Int -> ParaTriGrid
- data RectTriGrid
- rectTriGrid :: Int -> Int -> RectTriGrid
- data TorTriGrid
- torTriGrid :: Int -> Int -> TorTriGrid
- data YCylTriGrid
- yCylTriGrid :: Int -> Int -> YCylTriGrid
- data XCylTriGrid
- xCylTriGrid :: Int -> Int -> XCylTriGrid
Unbounded grid with triangular tiles
data UnboundedTriGrid Source
An unbounded grid with triangular tiles. The grid and its indexing scheme are illustrated in the user guide, available at https://github.com/mhwombat/grid/wiki.
Triangular grid with triangular tiles
data TriTriGrid Source
A triangular grid with triangular tiles. The grid and its indexing scheme are illustrated in the user guide, available at https://github.com/mhwombat/grid/wiki.
Eq TriTriGrid | |
Show TriTriGrid | |
Generic TriTriGrid | |
BoundedGrid TriTriGrid | |
FiniteGrid TriTriGrid | |
Grid TriTriGrid | |
type Rep TriTriGrid | |
type Size TriTriGrid = Int | |
type Index TriTriGrid = (Int, Int) | |
type Direction TriTriGrid = TriDirection |
triTriGrid :: Int -> TriTriGrid Source
returns a triangular grid with sides of
length triTriGrid
ss
, using triangular tiles. If s
is nonnegative, the
resulting grid will have s^2
tiles. Otherwise, the resulting grid
will be null and the list of indices will be null.
Parallelogram-shaped grid with triangular tiles
data ParaTriGrid Source
A Parallelogrammatical grid with triangular tiles. The grid and its indexing scheme are illustrated in the user guide, available at https://github.com/mhwombat/grid/wiki.
Eq ParaTriGrid | |
Show ParaTriGrid | |
Generic ParaTriGrid | |
BoundedGrid ParaTriGrid | |
FiniteGrid ParaTriGrid | |
Grid ParaTriGrid | |
type Rep ParaTriGrid | |
type Size ParaTriGrid = (Int, Int) | |
type Index ParaTriGrid = (Int, Int) | |
type Direction ParaTriGrid = TriDirection |
paraTriGrid :: Int -> Int -> ParaTriGrid Source
returns a grid in the shape of a
parallelogram with paraTriGrid
r cr
rows and c
columns, using triangular
tiles. If r
and c
are both nonnegative, the resulting grid will
have 2*r*c
tiles. Otherwise, the resulting grid will be null and
the list of indices will be null.
Rectangular grid with triangular tiles
data RectTriGrid Source
A rectangular grid with triangular tiles. The grid and its indexing scheme are illustrated in the user guide, available at https://github.com/mhwombat/grid/wiki.
Eq RectTriGrid | |
Show RectTriGrid | |
Generic RectTriGrid | |
BoundedGrid RectTriGrid | |
FiniteGrid RectTriGrid | |
Grid RectTriGrid | |
type Rep RectTriGrid | |
type Size RectTriGrid = (Int, Int) | |
type Index RectTriGrid = (Int, Int) | |
type Direction RectTriGrid = TriDirection |
rectTriGrid :: Int -> Int -> RectTriGrid Source
returns a grid in the shape of a
rectangle (with jagged edges) that has rectTriGrid
r cr
rows and c
columns,
using triangular tiles. If r
and c
are both nonnegative, the
resulting grid will have 2*r*c
tiles. Otherwise, the resulting grid will be null and
the list of indices will be null.
Toroidal grid with triangular tiles
data TorTriGrid Source
A toroidal grid with triangular tiles. The grid and its indexing scheme are illustrated in the user guide, available at https://github.com/mhwombat/grid/wiki.
Eq TorTriGrid | |
Show TorTriGrid | |
Generic TorTriGrid | |
WrappedGrid TorTriGrid | |
FiniteGrid TorTriGrid | |
Grid TorTriGrid | |
type Rep TorTriGrid | |
type Size TorTriGrid = (Int, Int) | |
type Index TorTriGrid = (Int, Int) | |
type Direction TorTriGrid = TriDirection |
torTriGrid :: Int -> Int -> TorTriGrid Source
returns a toroidal grid with torTriGrid
r cr
rows and c
columns, using triangular tiles. The indexing method is the same as
for ParaTriGrid
. If r
and c
are both nonnegative, the
resulting grid will have 2*r*c
tiles. Otherwise, the resulting
grid will be null and the list of indices will be null.
Cylindrical grids with triangular tiles
data YCylTriGrid Source
A cylindrical grid with triangular tiles, where the cylinder is along the y-axis. The grid and its indexing scheme are illustrated in the user guide, available at https://github.com/mhwombat/grid/wiki.
Eq YCylTriGrid | |
Show YCylTriGrid | |
Generic YCylTriGrid | |
WrappedGrid YCylTriGrid | |
FiniteGrid YCylTriGrid | |
Grid YCylTriGrid | |
type Rep YCylTriGrid | |
type Size YCylTriGrid = (Int, Int) | |
type Index YCylTriGrid = (Int, Int) | |
type Direction YCylTriGrid = TriDirection |
yCylTriGrid :: Int -> Int -> YCylTriGrid Source
returns a cylindrical grid with yCylTriGrid
r cr
rows and
c
columns, using triangular tiles, where the cylinder is along
the y-axis. The indexing method is the same as for ParaTriGrid
.
If r
and c
are both nonnegative, the resulting grid will have
2*r*c
tiles. Otherwise, the resulting grid will be null and the
list of indices will be null.
data XCylTriGrid Source
A cylindrical grid with triangular tiles, where the cylinder is along the x-axis. The grid and its indexing scheme are illustrated in the user guide, available at https://github.com/mhwombat/grid/wiki.
Eq XCylTriGrid | |
Show XCylTriGrid | |
Generic XCylTriGrid | |
WrappedGrid XCylTriGrid | |
FiniteGrid XCylTriGrid | |
Grid XCylTriGrid | |
type Rep XCylTriGrid | |
type Size XCylTriGrid = (Int, Int) | |
type Index XCylTriGrid = (Int, Int) | |
type Direction XCylTriGrid = TriDirection |
xCylTriGrid :: Int -> Int -> XCylTriGrid Source
returns a cylindrical grid with xCylTriGrid
r cr
rows and
c
columns, using triangular tiles, where the cylinder is along
the y-axis. The indexing method is the same as for ParaTriGrid
.
If r
and c
are both nonnegative, the resulting grid will have
2*r*c
tiles. Otherwise, the resulting grid will be null and the
list of indices will be null.