Copyright | (c) Chris Reade 2021 |
---|---|
License | BSD-style |
Maintainer | chrisreade@mac.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- padBorder :: Diagram2D b -> Diagram2D b
- chunks :: Int -> [a] -> [[a]]
- arrangeRowsGap :: Double -> Int -> [Diagram2D b] -> Diagram2D b
- arrangeRows :: Int -> [Diagram2D b] -> Diagram2D b
- labelAt :: Renderable (Text Double) b => Point V2 Double -> String -> Diagram2D b -> Diagram2D b
- sunGraph :: Tgraph
- jackGraph :: Tgraph
- kingGraph :: Tgraph
- queenGraph :: Tgraph
- aceGraph :: Tgraph
- deuceGraph :: Tgraph
- starGraph :: Tgraph
- kiteGraph :: Tgraph
- dartGraph :: Tgraph
- fool :: Tgraph
- foolD :: Tgraph
- foolDminus :: Tgraph
- foolDs :: [Tgraph]
- sunDs :: [Tgraph]
- kiteDs :: [Tgraph]
- dartDs :: [Tgraph]
- dartD4 :: Tgraph
- sun3Dart :: Tgraph
- foolFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- foolAndFoolD :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- figSunD3D2 :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- vertexTypesFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- forceVFigures :: Renderable (Path V2 Double) b => [Diagram2D b]
- pCompFig1 :: Renderable (Path V2 Double) b => Diagram2D b
- pCompFig2 :: Renderable (Path V2 Double) b => Diagram2D b
- pCompFig :: Renderable (Path V2 Double) b => Diagram2D b
- forceFoolDminus :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- forceDartD5Fig :: Renderable (Path V2 Double) b => Diagram2D b
- forceKiteD5Fig :: Renderable (Path V2 Double) b => Diagram2D b
- forceSunD5Fig :: Renderable (Path V2 Double) b => Diagram2D b
- forceFig :: Renderable (Path V2 Double) b => Diagram2D b
- brokenDart :: Tgraph
- badlyBrokenDart :: Tgraph
- brokenDartFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- badlyBrokenDartFig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- removeIncompletesFig :: Renderable (Path V2 Double) b => Diagram2D b
- mistake :: Tgraph
- mistake1 :: Tgraph
- superForceFig :: Renderable (Path V2 Double) b => Diagram2D b
- superForceRocketsFig :: Renderable (Path V2 Double) b => Diagram2D b
- boundaryFDart4 :: Tgraph
- boundaryFDart5 :: Tgraph
- boundaryFDart4Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- boundaryFDart5Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- boundaryGapFDart4 :: Tgraph
- boundaryGapFDart5 :: Tgraph
- boundaryGap4Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- boundaryGap5Fig :: (Renderable (Path V2 Double) b, Renderable (Text Double) b) => Diagram2D b
- boundaryVCoveringFigs :: Renderable (Path V2 Double) b => BoundaryState -> [Diagram2D b]
- boundaryECoveringFigs :: Renderable (Path V2 Double) b => BoundaryState -> [Diagram2D b]
- kingECoveringFig :: Renderable (Path V2 Double) b => Diagram2D b
- kingVCoveringFig :: Renderable (Path V2 Double) b => Diagram2D b
- kingEmpiresFig :: Renderable (Path V2 Double) b => Diagram2D b
- kingEmpire1Fig :: Renderable (Path V2 Double) b => Diagram2D b
- kingEmpire2Fig :: Renderable (Path V2 Double) b => Diagram2D b
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
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
queenGraph :: Tgraph Source #
Tgraph for vertex type queen.
deuceGraph :: Tgraph Source #
Tgraph for vertextype deuce.
Further Basic Tgraphs
foolDminus :: Tgraph Source #
foolDminus: 3 faces removed from foolD - still a valid Tgraph
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 is a legal but incorrect Tgraph - a kite with 2 darts on its long edges
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