grid-7.7.0: Tools for working with regular grids (graphs, lattices).

Copyright (c) Amy de Buitléir 2012-2015 BSD-style amy@nualeargais.ie experimental portable Safe-Inferred 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.

Synopsis

# Documentation

Constructors

 South Northwest Northeast North Southeast Southwest

Instances

 Eq TriDirection Show TriDirection Generic TriDirection type Rep TriDirection

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

 Eq UnboundedTriGrid Show UnboundedTriGrid Generic UnboundedTriGrid Grid UnboundedTriGrid type Rep UnboundedTriGrid type Index UnboundedTriGrid = (Int, Int) type Direction UnboundedTriGrid = TriDirection

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 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 s` returns a triangular grid with sides of length `s`, 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.

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 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 r c` returns a grid in the shape of a parallelogram with `r` 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.

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 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 r c` returns a grid in the shape of a rectangle (with jagged edges) that has `r` 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 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 r c` returns a toroidal grid with `r` 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.

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 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 r c` returns a cylindrical grid with `r` 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.

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 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 r c` returns a cylindrical grid with `r` 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.