PenroseKiteDart-1.0.0: Library to explore Penrose's Kite and Dart Tilings.
Copyright(c) Chris Reade 2021
LicenseBSD-style
Maintainerchrisreade@mac.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

HalfTile

Description

 
Synopsis

Documentation

data HalfTile rep Source #

Representing Half Tile Pieces Polymorphicly. Common code for both graphs and vector representations of tilings. For Pieces - rep is V2 Double For TileFaces (in Tgraphs) rep is (Vertex,Vertex,Vertex)

Constructors

LD rep

Left Dart

RD rep

Right Dart

LK rep

Left Kite

RK rep

Right Kite

Instances

Instances details
Drawable Patch Source #

Patches are drawable

Instance details

Defined in TileLib

Functor HalfTile Source #

Make Halftile a Functor

Instance details

Defined in HalfTile

Methods

fmap :: (a -> b) -> HalfTile a -> HalfTile b #

(<$) :: a -> HalfTile b -> HalfTile a #

Show rep => Show (HalfTile rep) Source # 
Instance details

Defined in HalfTile

Methods

showsPrec :: Int -> HalfTile rep -> ShowS #

show :: HalfTile rep -> String #

showList :: [HalfTile rep] -> ShowS #

Transformable a => Transformable (HalfTile a) Source #

HalfTile inherits Transformable - Requires FlexibleInstances

Instance details

Defined in HalfTile

Methods

transform :: Transformation (V (HalfTile a)) (N (HalfTile a)) -> HalfTile a -> HalfTile a #

Eq rep => Eq (HalfTile rep) Source # 
Instance details

Defined in HalfTile

Methods

(==) :: HalfTile rep -> HalfTile rep -> Bool #

(/=) :: HalfTile rep -> HalfTile rep -> Bool #

Ord rep => Ord (HalfTile rep) Source #

Note this ignores the tileLabels when comparing. However we should never have 2 different HalfTiles with the same rep

Instance details

Defined in HalfTile

Methods

compare :: HalfTile rep -> HalfTile rep -> Ordering #

(<) :: HalfTile rep -> HalfTile rep -> Bool #

(<=) :: HalfTile rep -> HalfTile rep -> Bool #

(>) :: HalfTile rep -> HalfTile rep -> Bool #

(>=) :: HalfTile rep -> HalfTile rep -> Bool #

max :: HalfTile rep -> HalfTile rep -> HalfTile rep #

min :: HalfTile rep -> HalfTile rep -> HalfTile rep #

type N (HalfTile a) Source #

Needed for Transformable instance of HalfTile - requires TypeFamilies

Instance details

Defined in HalfTile

type N (HalfTile a) = N a
type V (HalfTile a) Source #

Needed for Transformable instance of HalfTile - requires TypeFamilies

Instance details

Defined in HalfTile

type V (HalfTile a) = V a

tileRep :: HalfTile rep -> rep Source #

return the representation of a half-tile

isLD :: HalfTile rep -> Bool Source #

half-tile predicate

isRD :: HalfTile rep -> Bool Source #

half-tile predicate

isLK :: HalfTile rep -> Bool Source #

half-tile predicate

isRK :: HalfTile rep -> Bool Source #

half-tile predicate

isDart :: HalfTile rep -> Bool Source #

half-tile predicate

isKite :: HalfTile rep -> Bool Source #

half-tile predicate

type HalfTileLabel = HalfTile () Source #

By having () as the half tile representation we treat the constructors as just labels

tileLabel :: HalfTile a -> HalfTileLabel Source #

convert a half tile to its label (HalfTileLabel can be compared for equality)

isMatched :: HalfTile rep1 -> HalfTile rep2 -> Bool Source #

isMatched t1 t2 is True if t1 and t2 have the same HalfTileLabel (i.e. use the same constructor - both LD or both RD or both LK or both RK)