| Copyright | (c) Amy de Buitléir 2012-2015 |
|---|---|
| License | BSD-style |
| Maintainer | amy@nualeargais.ie |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell98 |
Math.Geometry.Grid.TriangularInternal
Description
A module containing private TriGrid internals. Most developers
should use TriGrid instead. This module is subject to change
without notice.
- data TriDirection
- data UnboundedTriGrid = UnboundedTriGrid
- triZ :: Int -> Int -> Int
- data TriTriGrid = TriTriGrid Int [(Int, Int)]
- inTriTriGrid :: (Int, Int) -> Int -> Bool
- triTriGrid :: Int -> TriTriGrid
- data ParaTriGrid = ParaTriGrid (Int, Int) [(Int, Int)]
- paraTriGrid :: Int -> Int -> ParaTriGrid
- parallelogramIndices :: Int -> Int -> [(Int, Int)]
- data RectTriGrid = RectTriGrid (Int, Int) [(Int, Int)]
- rectTriGrid :: Int -> Int -> RectTriGrid
- data TorTriGrid = TorTriGrid (Int, Int) [(Int, Int)]
- torTriGrid :: Int -> Int -> TorTriGrid
- data YCylTriGrid = YCylTriGrid (Int, Int) [(Int, Int)]
- yCylTriGrid :: Int -> Int -> YCylTriGrid
- data XCylTriGrid = XCylTriGrid (Int, Int) [(Int, Int)]
- xCylTriGrid :: Int -> Int -> XCylTriGrid
Documentation
data TriDirection Source
Instances
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.
Constructors
| UnboundedTriGrid |
Instances
triZ :: Int -> Int -> Int Source
For triangular tiles, it is convenient to define a third component z.
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.
Constructors
| TriTriGrid Int [(Int, Int)] |
Instances
| Eq TriTriGrid Source | |
| Show TriTriGrid Source | |
| Generic TriTriGrid Source | |
| BoundedGrid TriTriGrid Source | |
| FiniteGrid TriTriGrid Source | |
| Grid TriTriGrid Source | |
| type Rep TriTriGrid Source | |
| type Size TriTriGrid = Int Source | |
| type Index TriTriGrid = (Int, Int) Source | |
| type Direction TriTriGrid = TriDirection Source |
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.
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.
Constructors
| ParaTriGrid (Int, Int) [(Int, Int)] |
Instances
| Eq ParaTriGrid Source | |
| Show ParaTriGrid Source | |
| Generic ParaTriGrid Source | |
| BoundedGrid ParaTriGrid Source | |
| FiniteGrid ParaTriGrid Source | |
| Grid ParaTriGrid Source | |
| type Rep ParaTriGrid Source | |
| type Size ParaTriGrid = (Int, Int) Source | |
| type Index ParaTriGrid = (Int, Int) Source | |
| type Direction ParaTriGrid = TriDirection Source |
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.
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.
Constructors
| RectTriGrid (Int, Int) [(Int, Int)] |
Instances
| Eq RectTriGrid Source | |
| Show RectTriGrid Source | |
| Generic RectTriGrid Source | |
| BoundedGrid RectTriGrid Source | |
| FiniteGrid RectTriGrid Source | |
| Grid RectTriGrid Source | |
| type Rep RectTriGrid Source | |
| type Size RectTriGrid = (Int, Int) Source | |
| type Index RectTriGrid = (Int, Int) Source | |
| type Direction RectTriGrid = TriDirection Source |
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.
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.
Constructors
| TorTriGrid (Int, Int) [(Int, Int)] |
Instances
| Eq TorTriGrid Source | |
| Show TorTriGrid Source | |
| Generic TorTriGrid Source | |
| WrappedGrid TorTriGrid Source | |
| FiniteGrid TorTriGrid Source | |
| Grid TorTriGrid Source | |
| type Rep TorTriGrid Source | |
| type Size TorTriGrid = (Int, Int) Source | |
| type Index TorTriGrid = (Int, Int) Source | |
| type Direction TorTriGrid = TriDirection Source |
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.
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.
Constructors
| YCylTriGrid (Int, Int) [(Int, Int)] |
Instances
| Eq YCylTriGrid Source | |
| Show YCylTriGrid Source | |
| Generic YCylTriGrid Source | |
| WrappedGrid YCylTriGrid Source | |
| FiniteGrid YCylTriGrid Source | |
| Grid YCylTriGrid Source | |
| type Rep YCylTriGrid Source | |
| type Size YCylTriGrid = (Int, Int) Source | |
| type Index YCylTriGrid = (Int, Int) Source | |
| type Direction YCylTriGrid = TriDirection Source |
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.
Constructors
| XCylTriGrid (Int, Int) [(Int, Int)] |
Instances
| Eq XCylTriGrid Source | |
| Show XCylTriGrid Source | |
| Generic XCylTriGrid Source | |
| WrappedGrid XCylTriGrid Source | |
| FiniteGrid XCylTriGrid Source | |
| Grid XCylTriGrid Source | |
| type Rep XCylTriGrid Source | |
| type Size XCylTriGrid = (Int, Int) Source | |
| type Index XCylTriGrid = (Int, Int) Source | |
| type Direction XCylTriGrid = TriDirection Source |
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.