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

TgraphExamples

Description

 
Synopsis

Some Layout tools

padBorder :: Diagram2D b -> Diagram2D b Source #

used for most diagrams to give border padding

When a specific Backend B is in scope, padBorder:: Diagram B -> Diagram B

chunks :: Int -> [a] -> [[a]] Source #

chunks n l - split a list l into chunks of length n (n>0)

arrangeRowsGap :: Double -> Int -> [Diagram2D b] -> Diagram2D b Source #

arrangeRowsGap s n diags - arranges diags into n per row, centering each row horizontally, with a seperation gap (horizontally and vertically) of s. The result is a single diagram.

When a specific Backend B is in scope, arrangeRowsGap :: Double -> Int -> [Diagram B] -> Diagram B

arrangeRows :: Int -> [Diagram2D b] -> Diagram2D b Source #

arrangeRows n diags - arranges diags into n per row, centering each row horizontally. The result is a single diagram (seperation is 1 unit vertically and horizontally).

When a specific Backend B is in scope, arrangeRows :: Int -> [Diagram B] -> Diagram B

labelAt :: Renderable (Text Double) b => Point V2 Double -> String -> Diagram2D b -> Diagram2D b Source #

add a given label at a given point offset from the centre of the given diagram.

When a specific Backend B is in scope, labelAt :: Point V2 Double -> String -> Diagram B -> Diagram B

Tgraphs for 7 vertex types

sunGraph :: Tgraph Source #

Tgraph for a sun (sun vertex type)

jackGraph :: Tgraph Source #

Tgraph for vertex type jack.

kingGraph :: Tgraph Source #

Tgraph for vertex type king.

queenGraph :: Tgraph Source #

Tgraph for vertex type queen.

aceGraph :: Tgraph Source #

Tgraph for vertex type ace (same as fool).

deuceGraph :: Tgraph Source #

Tgraph for vertextype deuce.

starGraph :: Tgraph Source #

Tgraph for vertex type star.

Further Basic Tgraphs

kiteGraph :: Tgraph Source #

Tgraph for kite

dartGraph :: Tgraph Source #

Tgraph for a dart

fool :: Tgraph Source #

fool: fool's kite - also called an ace.

foolD :: Tgraph Source #

a once decomposed fool (= foolDs!!1)

foolDminus :: Tgraph Source #

foolDminus: 3 faces removed from foolD - still a valid Tgraph

foolDs :: [Tgraph] Source #

an infinite list of decompositions of fool

sunDs :: [Tgraph] Source #

an infinite list of decompositions of sunGraph

kiteDs :: [Tgraph] Source #

an infinite list of decompositions of a kite

dartDs :: [Tgraph] Source #

an infinite list of decompositions of a dart

dartD4 :: Tgraph Source #

Tgraph of 4 times decomposed dartGraph (used in several examples)

sun3Dart :: Tgraph Source #

A sun with 3 darts on the boundary NOT all adjacent (Used in superForceRocketsFig).

Some Simple Figures

foolFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

diagram of just fool.

When a specific Backend B is in scope, foolFig :: Diagram B

foolAndFoolD :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

diagram of fool with foolD.

When a specific Backend B is in scope, foolAndFoolD :: Diagram B

figSunD3D2 :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

Figure for a 3 times decomposed sun with a 2 times decomposed sun.

When a specific Backend B is in scope, figSunD3D2 :: Diagram B

Figures for 7 vertex types

vertexTypesFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

vertexTypesFig is 7 vertex types in a single diagram as a row.

When a specific Backend B is in scope, vertexTypesFig :: Diagram B

forceVFigures :: Renderable (Path V2 Double) b => [Diagram2D b] Source #

forceVFigures is a list of 7 diagrams - force of 7 vertex types.

When a specific Backend B is in scope, forceVFigures :: [Diagram B]

Partial Composition figures

pCompFig1 :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram showing partial composition of a forced 3 times decomposed dart (with remainder faces in pale green).

When a specific Backend B is in scope, pCompFig1 :: Diagram B

pCompFig2 :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram showing partial composition of a forced 3 times decomposed kite (with remainder faces in pale green).

When a specific Backend B is in scope, pCompFig2 :: Diagram B

pCompFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram showing two partial compositions (with remainder faces in pale green).

When a specific Backend B is in scope, pCompFig :: Diagram B

Forced Tgraph figures

forceFoolDminus :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

diagram of foolDminus and the result of forcing.

When a specific Backend B is in scope, forceFoolDminus :: Diagram B

forceDartD5Fig :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram of forced 5 times decomposed dart.

When a specific Backend B is in scope, forceDartD5Fig :: Diagram B

forceKiteD5Fig :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram of forced 5 times decomposed kite.

When a specific Backend B is in scope, forceKiteD5Fig :: Diagram B

forceSunD5Fig :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram of forced 5 times decomposed sun.

When a specific Backend B is in scope, forceSunD5Fig :: Diagram B

forceFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram of forced 5 times decomposed dart (left) and kite (right).

When a specific Backend B is in scope, forceFig :: Diagram B

Removed faces (forcing and composing)

brokenDart :: Tgraph Source #

brokenDart is a 4 times decomposed dart (dartD4) with 5 halftile faces removed. Forcing will repair to produce the same Tgraph as force dartD4. This graph can also be repeatedly composed (without forcing) to get a maximal Tgraph.

badlyBrokenDart :: Tgraph Source #

badlyBrokenDart has more faces removed from brokenDart. This will also get repaired by forcing (to produce the same as force dartD4). However it will fail to produce a valid Tgraph if composed twice without forcing.

brokenDartFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

brokenDartFig shows the faces removed from dartD4 to make brokenDart and badlyBrokenDart.

When a specific Backend B is in scope, brokenDartFig :: Diagram B

badlyBrokenDartFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

badlyBrokenDartFig shows badlyBrokenDart, followed by its composition, followed by the faces that would result from an unchecked second composition which are not tile-connected. (Simply applying compose twice to badlyBrokenDart will raise an error).

When a specific Backend B is in scope, badlyBrokenDartFig :: Diagram B

removeIncompletesFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

figure showing the result of removing incomplete tiles (those that do not have their matching halftile) to a 3 times decomposed sun.

When a specific Backend B is in scope, removeIncompletesFig :: Diagram B

Incorrect Tgraphs

mistake :: Tgraph Source #

mistake is a legal but incorrect Tgraph - a kite with 2 darts on its long edges

mistake1 :: Tgraph Source #

mistake1 is a kite bordered by 2 half darts (subgraph of mistake and still incorrect)

superForce Figure

superForceFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

Diagram showing superForce with initial Tgraph g (red), force g (red and black), and superForce g (red and black and blue).

When a specific Backend B is in scope, superForceFig :: Diagram B

superForceRocketsFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

Diagram showing 4 rockets formed by applying superForce to successive decompositions of sun3Dart. The decompositions are in red with normal force additions in black and superforce additions in blue.

When a specific Backend B is in scope, superForceRocketsFig :: Diagram B

Tgraphs with Boundary faces

boundaryFDart4 :: Tgraph Source #

graph of the boundary faces only of a forced graph (dartDs!!4)

boundaryFDart5 :: Tgraph Source #

graph of the boundary faces only of a forced graph (dartDs!!5)

boundaryFDart4Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

figure of the boundary faces only of a forced graph (dartDs!!4).

When a specific Backend B is in scope, boundaryFDart4Fig :: Diagram B

boundaryFDart5Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

figure of the boundary faces only of a forced graph (dartDs!!5).

When a specific Backend B is in scope, boundaryFDart5Fig :: Diagram B

boundaryGapFDart4 :: Tgraph Source #

graph of the boundary faces only of a forced graph - with extra faces removed to make a gap

boundaryGapFDart5 :: Tgraph Source #

graph of the boundary faces only of a forced graph - with extra faces removed to make a gap

boundaryGap4Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

figure for the boundary gap graph boundaryGapFDart4.

When a specific Backend B is in scope, boundaryGap4Fig :: Diagram B

boundaryGap5Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b Source #

figure for the boundary gap graph boundaryGapFDart5.

When a specific Backend B is in scope, boundaryGap5Fig :: Diagram B

Boundary coverings and empires

boundaryVCoveringFigs :: Renderable (Path V2 Double) b => BoundaryState -> [Diagram2D b] Source #

boundaryVCoveringFigs bd - produces a list of diagrams for the boundaryVCovering of bd (with the Tgraph represented by bd shown in red in each case).

When a specific Backend B is in scope, boundaryVCoveringFigs :: BoundaryState -> [Diagram B]

boundaryECoveringFigs :: Renderable (Path V2 Double) b => BoundaryState -> [Diagram2D b] Source #

boundaryECoveringFigs bd - produces a list of diagrams for the boundaryECovering of bd (with the Tgraph represented by bd shown in red in each case).

When a specific Backend B is in scope, boundaryECoveringFigs :: BoundaryState -> [Diagram B]

kingECoveringFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram showing the boundaryECovering of a forced kingGraph.

When a specific Backend B is in scope, kingECoveringFig :: Diagram B

kingVCoveringFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

diagram showing the boundaryVCovering of a forced kingGraph.

When a specific Backend B is in scope, kingVCoveringFig :: Diagram B

kingEmpiresFig :: Renderable (Path V2 Double) b => Diagram2D b Source #

figure showing King's empires (1 and 2).

When a specific Backend B is in scope, kingEmpiresFig :: Diagram B

kingEmpire1Fig :: Renderable (Path V2 Double) b => Diagram2D b Source #

figure showing King's empires 1.

When a specific Backend B is in scope, kingEmpire1Fig :: Diagram B

kingEmpire2Fig :: Renderable (Path V2 Double) b => Diagram2D b Source #

figure showing King's empire 2.

When a specific Backend B is in scope, kingEmpire2Fig :: Diagram B