PenroseKiteDart-1.0.0 Package Release

23 views
Skip to first unread message

rea...@googlemail.com

unread,
Apr 9, 2024, 5:59:41 AMApr 9
to diagrams-discuss
This is a Haskell  library for exploring Penrose's Kite and Dart tilings using Haskell Diagrams to draw the tilings.

It is now available on Hackage.

Chris Reade

Brent Yorgey

unread,
Apr 10, 2024, 10:54:39 AMApr 10
to rea...@googlemail.com, diagrams-discuss
Cool!  Thanks for sharing!

--
You received this message because you are subscribed to the Google Groups "diagrams-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diagrams-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diagrams-discuss/ac41c4e2-14c7-43c6-a34a-bef77f1a5786n%40googlegroups.com.
Message has been deleted

rea...@googlemail.com

unread,
Apr 11, 2024, 12:04:32 PMApr 11
to diagrams-discuss
I have a small art gallery https://github.com/chrisreade/PenroseKiteDart/tree/master/SVGs/ArtGallery
for PenroseKiteDart but the examples obviously require PenroseKiteDart as well as Diagrams (so maybe not suitable for the Diagrams gallery).

Anyway, here is a single sample with code  (using PKD and TgraphExamples from PenroseKiteDart)
-----
module Main (main) where
   
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine

-- From PenroseKiteDart package
import PKD(Tgraph,decompose,force,makeVP,colourDKG,subVP,faces)
import TgraphExamples(queenGraph)

-- Given a Tgraph, produce 7 layers, 6 by iterating (decompose . force) then a final force for the seventh.
-- Draw each layer with colourDKG and finer and finer line widths,
-- then overlay with mconcat for a final diagram.
nested :: Tgraph -> Diagram B
nested g =
  mconcat $ zipWith ($)
    [id, id, id, lw thin, lw veryThin, lw ultraThin, lw ultraThin]
    layers
  where
    graphs = iterate  (decompose . force) g
    finalgraph = force $ graphs !! 6
    vp = rotate (162@@deg) $ makeVP finalgraph
    layers = fmap (colourDKG (darkmagenta, indigo, gold) . subVP vp . faces) $
             take 6 graphs ++ [finalgraph]
       
fig::Diagram B
fig =  nested queenGraph

main :: IO ()
main = mainWith fig



nestedQueen.pdf
Reply all
Reply to author
Forward
0 new messages