I… occasionally just start producing random shapes, colors and transformations or combinations of them, using the diagrams library through the very handy diagrams-pandoc Pandoc filter, like here.
= [yellow, pink, violet, blue, white]
colors = mconcat
fstar k let rest = if k == 0 then circle 0.1 else scale 0.3 (fstar (k-1))
[ in (rest ||| (hrule 1 # lc (colors !! max 0 (k-1))) ||| rest) # rotateBy (fromIntegral j/n) # translateX 2
| j <- [0..(n-1)]
]where n = 3
= vcat [ fstar i | i <- [1..4] ]
fstars = mconcat
example mconcat
[ # rotateBy (fromIntegral j/m)
[ fstars | j <- [0..(m-1)]
# rotateBy (fromIntegral k/p)
] | k <- [0..(p-1)]
# bg black
] where m = 3
= 5 p
= strokeP $ fromVertices
sinPlot sin x)
[ p2 (x, | x <- [-2*pi, -2*pi+0.01 .. 2*pi]
]= darkblue
col1 = red
col2 = (translateX 5 $ hrule 10 # lc col1) ||| (sinPlot # lc col2)
arm
:(b:(c:(d:xs)))) = hcat [a,b,c,d] === grid xs
grid (a= hcat xs
grid xs
= return $ grid $
example mconcat [ arm # rotateBy (fromIntegral j/fromIntegral n) | j <- [0..(n-1)] ]
[ | n <- [3, 5 .. 25]
]
= strokeP $ fromVertices
sinPlot sin x)
[ p2 (x, | x <- [-2*pi, -2*pi+0.01 .. 2*pi]
]= darkblue
col1 = red
col2 = (translateX 5 $ hrule 10 # lc col1) ||| (sinPlot # lc col2)
arm = hcat [ mconcat [ arm # rotateBy (fromIntegral j/fromIntegral n) | j <- [0..(n-1)] ]
arm2 | n <- [3, 5 .. 15]
]= return $ mconcat
example # rotateBy (fromIntegral j/fromIntegral n) | j <- [0..(n-1)]
[ arm2 where n = 13 ]
Posted: