{-# LANGUAGE OverloadedStrings #-}
module Images.Mosaics where
import Data.List (intersperse)
import Text.Blaze.Svg11 ((!))
import Text.Blaze.Svg11 as S
import Text.Blaze.Svg11.Attributes as A
import Core.Geometry
import Core.Utils
mosaicSample :: [ (String , S.Svg) ]
mosaicSample :: [([Char], Svg)]
mosaicSample =
[ (,) [Char]
"nazariMosaic" ([Char] -> [Char] -> Svg
nazariMosaic [Char]
"orange" [Char]
"purple")
, (,) [Char]
"triReligiousMosaic" ([Char] -> [Char] -> [Char] -> Svg
triReligiousMosaic [Char]
"blue" [Char]
"orange" [Char]
"green")
, (,) [Char]
"hexagonsMosaic" ([Char] -> [Char] -> Svg
hexagonsMosaic [Char]
"navy" [Char]
"none")
, (,) [Char]
"beehiveMosaic" Svg
beehiveMosaic
, (,) [Char]
"lemonsMosaic" ([Char] -> Svg
lemonsMosaic [Char]
"gold")
, (,) [Char]
"arabicMosaic" ([Char] -> [Char] -> Svg
arabicMosaic [Char]
"blue" [Char]
"brown")
, (,) [Char]
"peopleMosaic" ([Char] -> [Char] -> Svg
peopleMosaic [Char]
"silver" [Char]
"white")
, (,) [Char]
"hexMosaic" ([Char] -> Svg
hexMosaic [Char]
"limegreen")
, (,) [Char]
"arrowsMosaic" ([Char] -> Svg
arrowsMosaic [Char]
"orange")
, (,) [Char]
"wiresMosaic" ([Char] -> Svg
wiresMosaic [Char]
"gray")
, (,) [Char]
"curvesMosaic" Svg
curvesMosaic
, (,) [Char]
"airplaneMosaic" ([Char] -> Svg
airplaneMosaic [Char]
"deepskyblue")
]
nazariMosaic :: String -> String -> Svg
nazariMosaic :: [Char] -> [Char] -> Svg
nazariMosaic [Char]
colorUpper [Char]
colorLower =
Svg -> Svg
svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
vb)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ (forall a. Show a => a -> [Char]
show forall a b. (a -> b) -> a -> b
$ Double
300forall a. Num a => a -> a -> a
*Double
h) forall a. [a] -> [a] -> [a]
++ [Char]
"px")
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs forall a b. (a -> b) -> a -> b
$ do
Svg
upperBirdie forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-upperBirdie"
Svg
lowerBirdie forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-lowerBirdie"
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id1
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id1 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Integer
2 Integer
0 )
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id1 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
1) Double
h )
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id1 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
1 Double
h )
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id1 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
1) (-Double
h))
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id2
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id2 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Integer
2) Integer
0 )
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id2 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
1) (-Double
h))
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id2 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
1 (-Double
h))
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
id2 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
1 Double
h )
where
vb :: [Char]
vb = [Char]
"-1 " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> [Char]
show (-Double
h) forall a. [a] -> [a] -> [a]
++ [Char]
" 2 " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> [Char]
show (Double
2forall a. Num a => a -> a -> a
*Double
h)
id1 :: AttributeValue
id1 = AttributeValue
"#HaskellSvgIcons-upperBirdie"
id2 :: AttributeValue
id2 = AttributeValue
"#HaskellSvgIcons-lowerBirdie"
h :: Double
h = forall a. Floating a => a -> a
sqrt Double
3
apt :: Double
apt = Double
h forall a. Fractional a => a -> a -> a
/ Double
3
ax :: Double
ax = Double
0
ay :: Double
ay = -Double
h
bx :: Double
bx = Double
1
by :: Double
by = Double
0
cx :: Double
cx = -Double
1
cy :: Double
cy = Double
0
dx :: Double
dx = Double
0
dy :: Double
dy = Double
h
mid :: a -> a -> a
mid a
x a
y = (a
x forall a. Num a => a -> a -> a
+ a
y) forall a. Fractional a => a -> a -> a
/ a
2
upperBirdie :: Svg
upperBirdie =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
colorUpper)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
upperDirs
lowerBirdie :: Svg
lowerBirdie =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
colorLower)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
lowerDirs
upperDirs :: AttributeValue
upperDirs =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
ax Double
ay
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Double
ax Double
bx) (forall a. Fractional a => a -> a -> a
mid Double
ay Double
by)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
False Double
bx Double
by
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Double
bx Double
cx) (forall a. Fractional a => a -> a -> a
mid Double
by Double
cy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
False Double
cx Double
cy
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Double
ax Double
cx) (forall a. Fractional a => a -> a -> a
mid Double
ay Double
cy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
False Double
ax Double
ay
Path
S.z
lowerDirs :: AttributeValue
lowerDirs =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
bx Double
by
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Double
bx Double
dx) (forall a. Fractional a => a -> a -> a
mid Double
by Double
dy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
False Double
dx Double
dy
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Double
cx Double
dx) (forall a. Fractional a => a -> a -> a
mid Double
cy Double
dy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
False Double
cx Double
cy
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Double
bx Double
cx) (forall a. Fractional a => a -> a -> a
mid Double
by Double
cy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
apt Double
apt Double
0 Bool
False Bool
False Double
bx Double
by
Path
S.z
triReligiousMosaic :: String -> String -> String -> Svg
triReligiousMosaic :: [Char] -> [Char] -> [Char] -> Svg
triReligiousMosaic [Char]
fill1 [Char]
fill2 [Char]
fill3 =
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ [Char]
"0 0 1 " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> [Char]
show (Float
2forall a. Num a => a -> a -> a
*Float
h))
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ (forall a. Show a => a -> [Char]
show forall a b. (a -> b) -> a -> b
$ Double
300 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3) forall a. [a] -> [a] -> [a]
++ [Char]
"px")
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs forall a b. (a -> b) -> a -> b
$ do
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"white"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
upperBird
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-triReligiousUpperBird"
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fill1)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
lowerBird
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-triReligiousLowerBird"
Int -> Float -> (Float, Float) -> Svg
starPolygonFirstSpecies Int
6 Float
0.17 (Float
0.5 , Float
h forall a. Num a => a -> a -> a
- Float
apt)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-triReligiousStar"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Float
30 Float
0.5 (Float
h forall a. Num a => a -> a -> a
- Float
apt))
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
hexagonDirs
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-triReligiousHexagon"
Svg
topBird
Svg
topBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Integer
1 Integer
0 )
Svg
topBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Float
0.5) Float
h )
Svg
topBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Float
0.5 Float
h )
Svg
topBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Float
0.5) (-Float
h))
Svg
botBird
Svg
botBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Integer
1) Integer
0 )
Svg
botBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Float
0.5) (-Float
h))
Svg
botBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Float
0.5 (-Float
h))
Svg
botBird forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Float
0.5 Float
h )
Svg
hexagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"white"
Svg
hexagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"white" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Float
0.5) (-Float
h))
Svg
hexagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"white" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Float
0.5 (-Float
h))
Svg
star forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fill2)
Svg
star forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fill3) forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Float
0.5) Float
h )
Svg
star forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fill3) forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Float
0.5 Float
h )
where
topBird :: Svg
topBird =
Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-triReligiousUpperBird"
botBird :: Svg
botBird =
Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-triReligiousLowerBird"
hexagon :: Svg
hexagon =
Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-triReligiousHexagon"
star :: Svg
star =
Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-triReligiousStar"
h :: Float
h = (forall a. Floating a => a -> a
sqrt Float
3) forall a. Fractional a => a -> a -> a
/ Float
2
apt :: Float
apt = Float
h forall a. Fractional a => a -> a -> a
/ Float
3
(Float
ax,Float
ay) = (Float
0.5 , Float
0 )
(Float
bx,Float
by) = (Float
1 , Float
h )
(Float
cx,Float
cy) = (Float
0 , Float
h )
(Float
dx,Float
dy) = (Float
0.5 , Float
2forall a. Num a => a -> a -> a
*Float
h)
mid :: a -> a -> a
mid a
x a
y = (a
x forall a. Num a => a -> a -> a
+ a
y) forall a. Fractional a => a -> a -> a
/ a
2
cos60 :: Float
cos60 = Float
0.5
sin60 :: Float
sin60 = Float
0.5 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Float
3
hexR :: Float
hexR = Float
0.24
(Float
h1x,Float
h1y) = (Float
0.5 forall a. Num a => a -> a -> a
+ Float
hexR , Float
apt forall a. Num a => a -> a -> a
+ Float
h )
(Float
h2x,Float
h2y) = (Float
0.5 forall a. Num a => a -> a -> a
+ Float
hexRforall a. Num a => a -> a -> a
*Float
cos60 , Float
apt forall a. Num a => a -> a -> a
+ Float
h forall a. Num a => a -> a -> a
- Float
hexRforall a. Num a => a -> a -> a
*Float
sin60)
(Float
h3x,Float
h3y) = (Float
0.5 forall a. Num a => a -> a -> a
- Float
hexRforall a. Num a => a -> a -> a
*Float
cos60 , Float
apt forall a. Num a => a -> a -> a
+ Float
h forall a. Num a => a -> a -> a
- Float
hexRforall a. Num a => a -> a -> a
*Float
sin60)
(Float
h4x,Float
h4y) = (Float
0.5 forall a. Num a => a -> a -> a
- Float
hexR , Float
apt forall a. Num a => a -> a -> a
+ Float
h )
(Float
h5x,Float
h5y) = (Float
0.5 forall a. Num a => a -> a -> a
- Float
hexRforall a. Num a => a -> a -> a
*Float
cos60 , Float
apt forall a. Num a => a -> a -> a
+ Float
h forall a. Num a => a -> a -> a
+ Float
hexRforall a. Num a => a -> a -> a
*Float
sin60)
(Float
h6x,Float
h6y) = (Float
0.5 forall a. Num a => a -> a -> a
+ Float
hexRforall a. Num a => a -> a -> a
*Float
cos60 , Float
apt forall a. Num a => a -> a -> a
+ Float
h forall a. Num a => a -> a -> a
+ Float
hexRforall a. Num a => a -> a -> a
*Float
sin60)
hexagonDirs :: AttributeValue
hexagonDirs =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Float
h1x Float
h1y
forall a. Show a => a -> a -> Path
l Float
h2x Float
h2y
forall a. Show a => a -> a -> Path
l Float
h3x Float
h3y
forall a. Show a => a -> a -> Path
l Float
h4x Float
h4y
forall a. Show a => a -> a -> Path
l Float
h5x Float
h5y
forall a. Show a => a -> a -> Path
l Float
h6x Float
h6y
Path
S.z
upperBird :: AttributeValue
upperBird =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Float
ax Float
ay
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Float
ax Float
bx) (forall a. Fractional a => a -> a -> a
mid Float
ay Float
by)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
False Float
bx Float
by
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Float
bx Float
cx) (forall a. Fractional a => a -> a -> a
mid Float
by Float
cy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
False Float
cx Float
cy
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Float
ax Float
cx) (forall a. Fractional a => a -> a -> a
mid Float
ay Float
cy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
False Float
ax Float
ay
lowerBird :: AttributeValue
lowerBird =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Float
bx Float
by
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Float
bx Float
dx) (forall a. Fractional a => a -> a -> a
mid Float
by Float
dy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
False Float
dx Float
dy
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Float
cx Float
dx) (forall a. Fractional a => a -> a -> a
mid Float
cy Float
dy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
False Float
cx Float
cy
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
True (forall a. Fractional a => a -> a -> a
mid Float
bx Float
cx) (forall a. Fractional a => a -> a -> a
mid Float
by Float
cy)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
apt Float
apt Float
0 Bool
False Bool
False Float
bx Float
by
Path
S.z
hexagonsMosaic :: String -> String -> Svg
hexagonsMosaic :: [Char] -> [Char] -> Svg
hexagonsMosaic [Char]
strkColor [Char]
fillColor = do
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ [Char]
"0 0 1 " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> [Char]
show (Double
3forall a. Num a => a -> a -> a
*Double
rad))
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ (forall a. Show a => a -> [Char]
show forall a b. (a -> b) -> a -> b
$ Double
300 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3) forall a. [a] -> [a] -> [a]
++ [Char]
"px")
forall a b. (a -> b) -> a -> b
$ do
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.05"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
strkColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fillColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
hexagonDirs
where
apt :: Double
apt = Double
0.5
rad :: Double
rad = (Double
2 forall a. Fractional a => a -> a -> a
/ forall a. Floating a => a -> a
sqrt Double
3) forall a. Num a => a -> a -> a
* Double
apt
aux :: Double
aux = forall a. Floating a => a -> a
sqrt forall a b. (a -> b) -> a -> b
$ Double
rad forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
2 forall a. Num a => a -> a -> a
- Double
apt forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
2
hexagonDirs :: AttributeValue
hexagonDirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.5 ( Double
3 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
0.05)
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
2.5 forall a. Num a => a -> a -> a
* Double
rad)
forall a. Show a => a -> a -> Path
m Double
0.5 Double
0
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad)
forall a. Show a => a -> a -> Path
l Double
0 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
0 (Double
1.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
2.5 forall a. Num a => a -> a -> a
* Double
rad)
forall a. Show a => a -> a -> Path
l Double
1 (Double
1.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
1 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad)
beehiveMosaic :: Svg
beehiveMosaic :: Svg
beehiveMosaic = do
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ [Char]
"0 0 1 " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> [Char]
show (Double
3forall a. Num a => a -> a -> a
*Double
rad))
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ (forall a. Show a => a -> [Char]
show forall a b. (a -> b) -> a -> b
$ Double
300 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3) forall a. [a] -> [a] -> [a]
++ [Char]
"px")
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs Svg
honeyGradient
Svg
hexagon
where
apt :: Double
apt = Double
0.5
rad :: Double
rad = (Double
2 forall a. Fractional a => a -> a -> a
/ forall a. Floating a => a -> a
sqrt Double
3) forall a. Num a => a -> a -> a
* Double
apt
aux :: Double
aux = forall a. Floating a => a -> a
sqrt forall a b. (a -> b) -> a -> b
$ Double
rad forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
2 forall a. Num a => a -> a -> a
- Double
apt forall a b. (Num a, Integral b) => a -> b -> a
^ Integer
2
hexagon :: Svg
hexagon =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.05"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"rgb(255,255,155)"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"url(#svg-honey-gradient)"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
hexagonDirs
hexagonDirs :: AttributeValue
hexagonDirs =
Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.5 ( Double
3 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
0.05)
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
2.5 forall a. Num a => a -> a -> a
* Double
rad)
forall a. Show a => a -> a -> Path
m Double
0.5 Double
0
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad)
forall a. Show a => a -> a -> Path
l Double
0 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
0 (Double
1.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
2.5 forall a. Num a => a -> a -> a
* Double
rad)
forall a. Show a => a -> a -> Path
l Double
1 (Double
1.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
1 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad forall a. Num a => a -> a -> a
+ Double
aux)
forall a. Show a => a -> a -> Path
l Double
0.5 (Double
0.5 forall a. Num a => a -> a -> a
* Double
rad)
honeyGradient :: Svg
honeyGradient =
Svg -> Svg
radialgradient
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cx AttributeValue
"30%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cy AttributeValue
"70%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.r AttributeValue
"50%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fx AttributeValue
"50%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fy AttributeValue
"60%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"svg-honey-gradient"
forall a b. (a -> b) -> a -> b
$ do
Svg
stop
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.offset AttributeValue
"0%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.style AttributeValue
"stop-color: rgba(255,255,255,0.3)"
Svg
stop
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.offset AttributeValue
"25%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.style AttributeValue
"stop-color: rgba(255,255,0,0.4)"
Svg
stop
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.offset AttributeValue
"50%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.style AttributeValue
"stop-color: rgba(255,215,0,0.4)"
Svg
stop
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.offset AttributeValue
"100%"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.style AttributeValue
"stop-color: rgba(255,140,0,0.4)"
lemonsMosaic :: String -> Svg
lemonsMosaic :: [Char] -> Svg
lemonsMosaic [Char]
fillColor =
Svg -> Svg
svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox AttributeValue
"0.15 0 0.85 1"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ forall a. Show a => a -> [Char]
show (Double
0.85 forall a. Num a => a -> a -> a
* Double
300) forall a. [a] -> [a] -> [a]
++ [Char]
"px")
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs forall a b. (a -> b) -> a -> b
$
Svg
lemon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-lemonTile"
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ( forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Double
29 Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 (-Double
0.5) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Double
29 Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 Double
0.5 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Double
29 Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0.43 (-Double
0.25) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround (-Double
29) Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0.43 Double
0.25 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround (-Double
29) Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0.43 Double
0.75 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround (-Double
29) Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.43) (-Double
0.75) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround (-Double
29) Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.43) (-Double
0.25) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround (-Double
29) Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.43) Double
0.25 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround (-Double
29) Double
0.5 Double
0.5)
where
iD :: AttributeValue
iD = AttributeValue
"#HaskellSvgIcons-lemonTile"
r1 :: Double
r1 = Double
0.24
r2 :: Double
r2 = Double
r1
k :: Double
k = Double
0.2
x0 :: Double
x0 = Double
0.5
y0 :: Double
y0 = Double
0.5
y1 :: Double
y1 = Double
y0 forall a. Num a => a -> a -> a
- Double
k
y2 :: Double
y2 = Double
y0 forall a. Num a => a -> a -> a
+ Double
k
f1 :: Double -> Double
f1 Double
y = Double
x0 forall a. Num a => a -> a -> a
- forall a. Floating a => a -> a
sqrt(Double
r1forall a b. (Num a, Integral b) => a -> b -> a
^Integer
2 forall a. Num a => a -> a -> a
- (Double
y forall a. Num a => a -> a -> a
- Double
y0)forall a b. (Num a, Integral b) => a -> b -> a
^Integer
2)
f2 :: Double -> Double
f2 Double
y = Double
x0 forall a. Num a => a -> a -> a
+ forall a. Floating a => a -> a
sqrt(Double
r1forall a b. (Num a, Integral b) => a -> b -> a
^Integer
2 forall a. Num a => a -> a -> a
- (Double
y forall a. Num a => a -> a -> a
- Double
y0)forall a b. (Num a, Integral b) => a -> b -> a
^Integer
2)
lemon :: Svg
lemon =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.strokeWidth (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fillColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
lemonDirs
lemonDirs :: AttributeValue
lemonDirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.5 Double
0.15
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r2 Double
r2 Double
0 Bool
False Bool
True (Double -> Double
f1 Double
y1) Double
y1
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
False Bool
False (Double -> Double
f1 Double
y2) Double
y2
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r2 Double
r2 Double
0 Bool
False Bool
True Double
0.5 Double
0.85
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r2 Double
r2 Double
0 Bool
False Bool
True (Double -> Double
f2 Double
y2) Double
y2
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
False Bool
False (Double -> Double
f2 Double
y1) Double
y1
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r2 Double
r2 Double
0 Bool
False Bool
True Double
0.5 Double
0.15
Path
S.z
arabicMosaic :: String -> String -> Svg
arabicMosaic :: [Char] -> [Char] -> Svg
arabicMosaic [Char]
c1 [Char]
c2 =
Svg -> Svg
svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox AttributeValue
"-1 -1 2 2"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height AttributeValue
"300px"
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs forall a b. (a -> b) -> a -> b
$
Svg
corner forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-arabicTile"
Svg -> Svg
S.g forall a b. (a -> b) -> a -> b
$ do
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Integer
180 Integer
0 Integer
0 )
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Integer
1) Integer
0 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Double
270 Double
0.5 Double
0.5)
Svg
use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
xlinkHref AttributeValue
iD forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Integer
0 (-Integer
1) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Double
90 Double
0.5 Double
0.5)
where
color1 :: AttributeValue
color1 = forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
c1
color2 :: AttributeValue
color2 = forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
c2
iD :: AttributeValue
iD = AttributeValue
"#HaskellSvgIcons-arabicTile"
s :: Float
s = Float
0.05
k1 :: Float
k1 = Float
0.16
k2 :: Float
k2 = (Float
1forall a. Fractional a => a -> a -> a
/Float
3) forall a. Num a => a -> a -> a
* (Float
0.5 forall a. Num a => a -> a -> a
- Float
k1 forall a. Num a => a -> a -> a
+ Float
s)
(Float
ax, Float
ay) = (Float
0.5 forall a. Num a => a -> a -> a
+ Float
k1, Float
0.5 forall a. Num a => a -> a -> a
- Float
k1)
(Float
bx, Float
by) = (Float
0.5 forall a. Num a => a -> a -> a
- Float
k1, Float
0.5 forall a. Num a => a -> a -> a
+ Float
k1)
corner :: Svg
corner =
Svg -> Svg
S.g
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.strokeWidth (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
2forall a. Num a => a -> a -> a
*Float
s)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall a b. (a -> b) -> a -> b
$ do
Svg
S.path forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
color1 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs1
Svg
S.path forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
color2 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs2
Svg
S.path forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
color1 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs3
Svg
S.rect
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.x (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
ax forall a. Num a => a -> a -> a
- Float
s)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.y (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
ay forall a. Num a => a -> a -> a
- Float
s)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.width (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
2forall a. Num a => a -> a -> a
*Float
s)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.height (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
2forall a. Num a => a -> a -> a
*Float
s)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
color1
dirs1 :: AttributeValue
dirs1 = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.5 Double
1
forall a. Show a => a -> a -> Path
l Float
ax (Float
1forall a. Num a => a -> a -> a
-Float
k2)
forall a. Show a => a -> a -> Path
l Float
ax Float
ay
dirs2 :: AttributeValue
dirs2 = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
1 Double
0.5
forall a. Show a => a -> a -> Path
l (Float
1forall a. Num a => a -> a -> a
-Float
k2) Float
by
forall a. Show a => a -> a -> Path
l Float
bx Float
by
forall a. Show a => a -> a -> Path
l Float
bx Float
k2
forall a. Show a => a -> a -> Path
l Double
0.5 Double
0
dirs3 :: AttributeValue
dirs3 = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Float
ax Float
ay
forall a. Show a => a -> a -> Path
l Float
k2 Float
ay
forall a. Show a => a -> a -> Path
l Double
0 Double
0.5
peopleMosaic :: String -> String -> Svg
peopleMosaic :: [Char] -> [Char] -> Svg
peopleMosaic [Char]
strkColor [Char]
fillColor =
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox AttributeValue
"-1 -1 2 2"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height AttributeValue
"300"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300"
forall a b. (a -> b) -> a -> b
$ Svg -> Svg
S.g forall a b. (a -> b) -> a -> b
$ do
Svg
part1
Svg
part1 forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform AttributeValue
horizontalMirrorMatrix
where
part1 :: Svg
part1 = Svg -> Svg
S.g forall a b. (a -> b) -> a -> b
$ do
Svg
mainLine
Svg
mainLine forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Integer
1 Integer
1)
mainLine :: Svg
mainLine =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fillColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
strkColor)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.strokeWidth (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0.05)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
mainPath
mainPath :: AttributeValue
mainPath = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Integer
0 (-Integer
1)
forall a. Show a => a -> a -> a -> a -> Path
q (-Double
0.6) (-Double
0.8) (-Double
0.4) (-Double
0.5)
forall a. Show a => a -> a -> a -> a -> Path
q (-Double
1) (-Double
0.6) (-Double
1) Double
0
hexMosaic :: String -> Svg
hexMosaic :: [Char] -> Svg
hexMosaic [Char]
strkColor =
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat forall a b. (a -> b) -> a -> b
$ forall a. a -> [a] -> [a]
intersperse [Char]
" " forall a b. (a -> b) -> a -> b
$ forall a b. (a -> b) -> [a] -> [b]
map forall a. Show a => a -> [Char]
show [Double
vbX, Double
vbY, Double
vbW, Double
vbH])
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ forall a. Show a => a -> [Char]
show (Double
300 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3) forall a. [a] -> [a] -> [a]
++ [Char]
"px")
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
S.defs forall a b. (a -> b) -> a -> b
$
Svg
baseHexDef
Svg -> Svg
S.g forall a b. (a -> b) -> a -> b
$ do
Svg
baseHex forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 ((-Double
3) forall a. Num a => a -> a -> a
* Double
k))
Svg
baseTile
Svg
baseTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate ((-Double
3) forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) ((-Double
3) forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30))
Svg
baseTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate ( Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) ((-Double
3) forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30))
Svg
baseTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate ((-Double
3) forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) ( Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30))
Svg
baseTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate ( Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) ( Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30))
where
vbX :: Double
vbX = (-Double
1) forall a. Num a => a -> a -> a
* Double
0.5 forall a. Num a => a -> a -> a
* Double
vbW
vbY :: Double
vbY = (-Double
1) forall a. Num a => a -> a -> a
* Double
0.5 forall a. Num a => a -> a -> a
* Double
vbH
vbW :: Double
vbW = Double
6 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30
vbH :: Double
vbH = Double
3 forall a. Num a => a -> a -> a
* Double
k
k :: Double
k = Double
1
cos30 :: Double
cos30 = Double
0.5 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3
sin30 :: Double
sin30 = Double
0.5
baseHex :: Svg
baseHex = Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-hexTile"
baseTile :: Svg
baseTile =
Svg -> Svg
S.g forall a b. (a -> b) -> a -> b
$ do
Svg
baseHex
Svg
baseHex forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Integer
120 Integer
0 Integer
0)
Svg
baseHex forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Integer
240 Integer
0 Integer
0)
baseHexDef :: Svg
baseHexDef =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-hexTile"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
strkColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.05"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinejoin AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
baseHexDirs
baseHexDirs :: AttributeValue
baseHexDirs = Path -> AttributeValue
S.mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m ( Double
k forall a. Num a => a -> a -> a
* Double
cos30) (Double
k forall a. Num a => a -> a -> a
* Double
sin30)
forall a. Show a => a -> a -> Path
l Integer
0 Integer
0
forall a. Show a => a -> a -> Path
l Double
0 Double
k
forall a. Show a => a -> a -> Path
lr ( Double
k forall a. Num a => a -> a -> a
* Double
cos30) (Double
k forall a. Num a => a -> a -> a
* Double
sin30)
forall a. Show a => a -> a -> Path
m Integer
0 Integer
0
forall a. Show a => a -> a -> Path
l (-Double
k forall a. Num a => a -> a -> a
* Double
cos30) (Double
k forall a. Num a => a -> a -> a
* Double
sin30)
forall a. Show a => a -> a -> Path
lr Double
0 Double
k
forall a. Show a => a -> a -> Path
lr ( Double
k forall a. Num a => a -> a -> a
* Double
cos30) (Double
k forall a. Num a => a -> a -> a
* Double
sin30)
forall a. Show a => a -> a -> Path
m ( Double
k forall a. Num a => a -> a -> a
* Double
cos30) ( Double
k forall a. Num a => a -> a -> a
* Double
sin30 forall a. Num a => a -> a -> a
+ Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k)
forall a. Show a => a -> a -> Path
l (Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) (Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30 forall a. Num a => a -> a -> a
+ Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k)
forall a. Show a => a -> a -> Path
l (Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) (Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30 forall a. Num a => a -> a -> a
+ Double
2forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k)
forall a. Show a => a -> a -> Path
l ( Double
k forall a. Num a => a -> a -> a
* Double
cos30) ( Double
k forall a. Num a => a -> a -> a
* Double
sin30 forall a. Num a => a -> a -> a
+ Double
2forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k)
forall a. Show a => a -> a -> Path
m (Double
2forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) (Double
2forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30 forall a. Num a => a -> a -> a
+ Double
4forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k)
forall a. Show a => a -> a -> Path
lr ( -Double
1 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30) ( -Double
1 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30 )
forall a. Show a => a -> a -> Path
lr Double
0 (Double
2forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* (-Double
1) )
forall a. Show a => a -> a -> Path
lr (Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
cos30 forall a. Num a => a -> a -> a
* (-Double
1)) (Double
1forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k forall a. Num a => a -> a -> a
* Double
sin30 )
forall a. Show a => a -> a -> Path
lr Double
0 (Double
2forall a. Fractional a => a -> a -> a
/Double
3 forall a. Num a => a -> a -> a
* Double
k )
forall a. Show a => a -> a -> Path
lr ( Double
k forall a. Num a => a -> a -> a
* Double
cos30) ( Double
k forall a. Num a => a -> a -> a
* Double
sin30)
arrowsMosaic :: String -> Svg
arrowsMosaic :: [Char] -> Svg
arrowsMosaic [Char]
strkColor =
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ [Char]
"0 0 1 " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> [Char]
show (Double
2forall a. Num a => a -> a -> a
*Double
h))
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height (forall a. ToValue a => a -> AttributeValue
S.toValue forall a b. (a -> b) -> a -> b
$ forall a. Show a => a -> [Char]
show (Double
300 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3) forall a. [a] -> [a] -> [a]
++ [Char]
"px")
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs forall a b. (a -> b) -> a -> b
$
Svg
basePath forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-arrowTile"
Svg
arrowTile
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Integer
1 Integer
0 )
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.5) Double
h )
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0.5 Double
h )
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.5) (-Double
h))
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ( AttributeValue
mirror)
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Integer
1) Integer
0 forall a. Semigroup a => a -> a -> a
<> AttributeValue
mirror)
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate (-Double
0.5) (-Double
h) forall a. Semigroup a => a -> a -> a
<> AttributeValue
mirror)
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0.5 (-Double
h) forall a. Semigroup a => a -> a -> a
<> AttributeValue
mirror)
Svg
arrowTile forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0.5 Double
h forall a. Semigroup a => a -> a -> a
<> AttributeValue
mirror)
where
h :: Double
h = Double
sin60
sin60 :: Double
sin60 = Double
0.5 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3
cos60 :: Double
cos60 = Double
0.5
tan60 :: Double
tan60 = Double
sin60 forall a. Fractional a => a -> a -> a
/ Double
cos60
tan60' :: Double
tan60' = Double
cos60 forall a. Fractional a => a -> a -> a
/ Double
sin60
k :: Double
k = (Double
1forall a. Fractional a => a -> a -> a
/Double
6) forall a. Num a => a -> a -> a
* (Double
cos60 forall a. Fractional a => a -> a -> a
/ Double
sin60)
(Double
ax,Double
ay) = (Double
tan60' forall a. Num a => a -> a -> a
* Double
k , Double
h forall a. Num a => a -> a -> a
- Double
k )
(Double
bx,Double
by) = (Double
0.5 forall a. Num a => a -> a -> a
+ Double
2forall a. Num a => a -> a -> a
*Double
kforall a. Num a => a -> a -> a
*Double
tan60' , Double
h forall a. Num a => a -> a -> a
- Double
k )
(Double
cx,Double
cy) = (Double
0.5 , Double
h forall a. Num a => a -> a -> a
- Double
3forall a. Num a => a -> a -> a
*Double
k )
(Double
dx,Double
dy) = (Double
0.5 forall a. Num a => a -> a -> a
- Double
2forall a. Num a => a -> a -> a
*Double
kforall a. Fractional a => a -> a -> a
/Double
sin60 , Double
h forall a. Num a => a -> a -> a
- Double
3forall a. Num a => a -> a -> a
*Double
k )
(Double
ex,Double
ey) = (Double
0.5 forall a. Num a => a -> a -> a
+ Double
kforall a. Num a => a -> a -> a
*Double
tan60' , Double
k )
(Double
fx,Double
fy) = (Double
0.5 forall a. Num a => a -> a -> a
+ Double
2forall a. Num a => a -> a -> a
*Double
kforall a. Num a => a -> a -> a
*Double
tan60' , Double
h forall a. Num a => a -> a -> a
- Double
5forall a. Num a => a -> a -> a
*Double
k )
(Double
gx,Double
gy) = (Double
1 forall a. Num a => a -> a -> a
- Double
2forall a. Num a => a -> a -> a
*Double
kforall a. Num a => a -> a -> a
*Double
tan60' , Double
h )
arrowTile :: Svg
arrowTile =
Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-arrowTile"
mirror :: AttributeValue
mirror = forall a. Show a => a -> a -> a -> a -> a -> a -> AttributeValue
S.matrix Double
1 Double
0 Double
0 (-Double
1) Double
0 (Double
2forall a. Num a => a -> a -> a
*Double
h)
basePath :: Svg
basePath =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
d AttributeValue
baseDirections
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
strokeWidth AttributeValue
"0.03"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
stroke (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
strkColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
strokeLinejoin AttributeValue
"round"
baseDirections :: AttributeValue
baseDirections = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
cx Double
cy
forall a. Show a => a -> a -> Path
l Double
bx Double
by
forall a. Show a => a -> a -> Path
l Double
ax Double
ay
forall a. Show a => a -> a -> Path
m Double
cx Double
cy
forall a. Show a => a -> a -> Path
l Double
dx Double
dy
forall a. Show a => a -> a -> Path
l Double
ex Double
ey
forall a. Show a => a -> a -> Path
m Double
cx Double
cy
forall a. Show a => a -> a -> Path
l Double
fx Double
fy
forall a. Show a => a -> a -> Path
l Double
gx Double
gy
wiresMosaic :: String -> Svg
wiresMosaic :: [Char] -> Svg
wiresMosaic [Char]
strkColor =
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox AttributeValue
"0 0 1 1"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs forall a b. (a -> b) -> a -> b
$
Svg
topLeftCorner forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-wireTile"
Svg
corner
Svg
corner forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> a -> a -> a -> AttributeValue
matrix Integer
1 Integer
0 Integer
0 (-Integer
1) Integer
0 Integer
1)
Svg
corner forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> a -> a -> a -> AttributeValue
matrix (-Integer
1) Integer
0 Integer
0 Integer
1 Integer
1 Integer
0)
Svg
corner forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Double
180 Double
0.5 Double
0.5)
where
oct :: a -> a
oct a
k = (a
k forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt a
2) forall a. Fractional a => a -> a -> a
/ (a
2 forall a. Num a => a -> a -> a
+ forall a. Floating a => a -> a
sqrt a
2)
corner :: Svg
corner =
Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-wireTile"
topLeftCorner :: Svg
topLeftCorner =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.002"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
strkColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
topLeftDirections
topLeftDirections :: AttributeValue
topLeftDirections = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.49 Double
0
forall a. Show a => a -> a -> Path
l Double
0.49 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.48 Double
0
forall a. Show a => a -> a -> Path
l Double
0.48 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.47 Double
0
forall a. Show a => a -> a -> Path
l Double
0.47 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.435 Double
0
forall a. Show a => a -> a -> Path
l Double
0.435 Double
0.07
forall a. Show a => a -> a -> Path
l Double
0.42 Double
0.12
forall a. Show a => a -> a -> Path
l Double
0.42 Double
0.15
forall a. Show a => a -> a -> Path
m Double
0.42 Double
0.12
forall a. Show a => a -> a -> Path
l Double
0.428 Double
0.13
forall a. Show a => a -> a -> Path
l Double
0.428 Double
0.15
forall a. Show a => a -> a -> Path
m Double
0.435 Double
0.07
forall a. Show a => a -> a -> Path
l Double
0.45 Double
0.12
forall a. Show a => a -> a -> Path
l Double
0.45 Double
0.22
forall a. Show a => a -> a -> Path
m Double
0.45 Double
0.12
forall a. Show a => a -> a -> Path
l Double
0.44 Double
0.15
forall a. Show a => a -> a -> Path
l Double
0.44 Double
0.18
forall a. Show a => a -> a -> Path
m Double
0.4 Double
0
forall a. Show a => a -> a -> Path
l Double
0.4 Double
0.15
forall a. Show a => a -> a -> Path
l Double
0.45 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.45 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.39 Double
0
forall a. Show a => a -> a -> Path
l Double
0.39 Double
0.15
forall a. Show a => a -> a -> Path
l Double
0.44 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.44 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.38 Double
0
forall a. Show a => a -> a -> Path
l Double
0.38 Double
0.15
forall a. Show a => a -> a -> Path
l Double
0.43 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.43 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.025
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.025
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.045
forall a. Show a => a -> a -> Path
m Double
0 Double
0.035
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.035
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.045
forall a. Show a => a -> a -> Path
m Double
0 Double
0.045
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.045
forall a. Show a => a -> a -> Path
m Double
0 Double
0.055
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.055
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.045
forall a. Show a => a -> a -> Path
m Double
0 Double
0.065
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.065
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.045
forall a. Show a => a -> a -> Path
m Double
0 Double
0.125
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.125
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.145
forall a. Show a => a -> a -> Path
m Double
0 Double
0.135
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.135
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.145
forall a. Show a => a -> a -> Path
m Double
0 Double
0.145
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.145
forall a. Show a => a -> a -> Path
m Double
0 Double
0.155
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.155
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.145
forall a. Show a => a -> a -> Path
m Double
0 Double
0.165
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.165
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.145
forall a. Show a => a -> a -> Path
m Double
0 Double
0.225
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.225
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.245
forall a. Show a => a -> a -> Path
m Double
0 Double
0.235
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.235
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.245
forall a. Show a => a -> a -> Path
m Double
0 Double
0.245
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.245
forall a. Show a => a -> a -> Path
m Double
0 Double
0.255
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.255
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.245
forall a. Show a => a -> a -> Path
m Double
0 Double
0.265
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.265
forall a. Show a => a -> a -> Path
l Double
0.18 Double
0.245
forall a. Show a => a -> a -> Path
m Double
0.18 Double
0.045
forall a. Show a => a -> a -> Path
l Double
0.22 Double
0.045
forall a. Show a => a -> a -> Path
l Double
0.27 Double
0.095
forall a. Show a => a -> a -> Path
l Double
0.3 Double
0.095
forall a. Show a => a -> a -> Path
l Double
0.3 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.4 Double
0.35
forall a. Show a => a -> a -> Path
l Double
0.4 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.18 Double
0.145
forall a. Show a => a -> a -> Path
l Double
0.22 Double
0.145
forall a. Show a => a -> a -> Path
l Double
0.25 Double
0.175
forall a. Show a => a -> a -> Path
l Double
0.28 Double
0.175
forall a. Show a => a -> a -> Path
l Double
0.28 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.38 Double
0.35
forall a. Show a => a -> a -> Path
l Double
0.38 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.18 Double
0.245
forall a. Show a => a -> a -> Path
l Double
0.22 Double
0.245
forall a. Show a => a -> a -> Path
l Double
0.23 Double
0.255
forall a. Show a => a -> a -> Path
l Double
0.26 Double
0.255
forall a. Show a => a -> a -> Path
l Double
0.26 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.36 Double
0.35
forall a. Show a => a -> a -> Path
l Double
0.36 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.5 Double
0
forall a. Show a => a -> a -> Path
l Double
0.35 Double
0
forall a. Show a => a -> a -> Path
m Double
0.25 Double
0
forall a. Show a => a -> a -> Path
l Double
0.25 Double
0.05
forall a. Show a => a -> a -> Path
l Double
0.3 Double
0.05
forall a. Show a => a -> a -> Path
m Double
0.35 Double
0
forall a. Show a => a -> a -> Path
l Double
0.35 Double
0.05
forall a. Show a => a -> a -> Path
l Double
0.3 Double
0.05
forall a. Show a => a -> a -> Path
l Double
0.3 Double
0.07
forall a. Show a => a -> a -> Path
l Double
0.35 Double
0.07
forall a. Show a => a -> a -> Path
l Double
0.35 Double
0.25
forall a. Show a => a -> a -> Path
l Double
0.33 Double
0.23
forall a. Show a => a -> a -> Path
l Double
0.33 Double
0.21
forall a. Show a => a -> a -> Path
m Double
0.33 Double
0.23
forall a. Show a => a -> a -> Path
l Double
0.31 Double
0.23
forall a. Show a => a -> a -> Path
m Double
0.35 Double
0.25
forall a. Show a => a -> a -> Path
l Double
0.38 Double
0.25
forall a. Show a => a -> a -> Path
m Double
0.35 Double
0.25
forall a. Show a => a -> a -> Path
l Double
0.32 Double
0.27
forall a. Show a => a -> a -> Path
l Double
0.32 Double
0.29
forall a. Show a => a -> a -> Path
l Double
0.34 Double
0.30
forall a. Show a => a -> a -> Path
m Double
0.35 Double
0.25
forall a. Show a => a -> a -> Path
l Double
0.35 Double
0.27
forall a. Show a => a -> a -> Path
l Double
0.34 Double
0.28
forall a. Show a => a -> a -> Path
m Double
0.35 Double
0.27
forall a. Show a => a -> a -> Path
l Double
0.36 Double
0.28
forall a. Show a => a -> a -> Path
l Double
0.36 Double
0.3
forall a. Show a => a -> a -> Path
m Double
0.35 Double
0.25
forall a. Show a => a -> a -> Path
l Double
0.38 Double
0.27
forall a. Show a => a -> a -> Path
l Double
0.38 Double
0.29
forall a. Show a => a -> a -> Path
l Double
0.415 Double
0.31
forall a. Show a => a -> a -> Path
l Double
0.415 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.35 Double
0.25
forall a. Show a => a -> a -> Path
l Double
0.37 Double
0.23
forall a. Show a => a -> a -> Path
l Double
0.37 Double
0.21
forall a. Show a => a -> a -> Path
m Double
0.37 Double
0.23
forall a. Show a => a -> a -> Path
l Double
0.39 Double
0.23
forall a. Show a => a -> a -> Path
m Double
0 Double
0.49
forall a. Show a => a -> a -> Path
l Double
0.01 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.47
forall a. Show a => a -> a -> Path
l Double
0.03 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.45
forall a. Show a => a -> a -> Path
l Double
0.05 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.43
forall a. Show a => a -> a -> Path
l Double
0.07 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.4
forall a. Show a => a -> a -> Path
l (forall a. Floating a => a -> a
oct Double
0.1) Double
0.4
forall a. Show a => a -> a -> Path
l Double
0.1 (Double
0.5 forall a. Num a => a -> a -> a
- forall a. Floating a => a -> a
oct Double
0.1)
forall a. Show a => a -> a -> Path
l Double
0.1 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.38
forall a. Show a => a -> a -> Path
l (forall a. Floating a => a -> a
oct Double
0.12) Double
0.38
forall a. Show a => a -> a -> Path
l Double
0.12 (Double
0.5 forall a. Num a => a -> a -> a
- forall a. Floating a => a -> a
oct Double
0.12)
forall a. Show a => a -> a -> Path
l Double
0.12 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.36
forall a. Show a => a -> a -> Path
l (forall a. Floating a => a -> a
oct Double
0.14) Double
0.36
forall a. Show a => a -> a -> Path
l Double
0.14 (Double
0.5 forall a. Num a => a -> a -> a
- forall a. Floating a => a -> a
oct Double
0.14)
forall a. Show a => a -> a -> Path
l Double
0.14 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.34
forall a. Show a => a -> a -> Path
l (forall a. Floating a => a -> a
oct Double
0.16) Double
0.34
forall a. Show a => a -> a -> Path
l Double
0.16 (Double
0.5 forall a. Num a => a -> a -> a
- forall a. Floating a => a -> a
oct Double
0.16)
forall a. Show a => a -> a -> Path
l Double
0.16 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.2 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.2 Double
0.3
forall a. Show a => a -> a -> Path
l Double
0.2 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.2 Double
0.5
forall a. Show a => a -> a -> Path
l Double
0.415 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0.2 Double
0.475
forall a. Show a => a -> a -> Path
l Double
0.36 Double
0.475
forall a. Show a => a -> a -> Path
m Double
0.2 Double
0.45
forall a. Show a => a -> a -> Path
l Double
0.36 Double
0.45
forall a. Show a => a -> a -> Path
m Double
0.28 Double
0.45
forall a. Show a => a -> a -> Path
l Double
0.28 Double
0.39
forall a. Show a => a -> a -> Path
l Double
0.25 Double
0.39
forall a. Show a => a -> a -> Path
m Double
0.28 Double
0.39
forall a. Show a => a -> a -> Path
l Double
0.31 Double
0.39
forall a. Show a => a -> a -> Path
m Double
0.28 Double
0.39
forall a. Show a => a -> a -> Path
l Double
0.28 Double
0.36
curvesMosaic :: Svg
curvesMosaic :: Svg
curvesMosaic =
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox AttributeValue
"0 0 1 1"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall a b. (a -> b) -> a -> b
$ do
Svg
curve1
Svg
curve2
Svg
curve3
Svg
curve4
Svg
curve5
Svg
curve6
Svg
curve7
Svg
littleCircle
where
littleCircle :: Svg
littleCircle = do
Svg
S.circle forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"purple" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.r AttributeValue
"0.03" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cx AttributeValue
"0" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cy AttributeValue
"0"
Svg
S.circle forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"purple" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.r AttributeValue
"0.03" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cx AttributeValue
"1" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cy AttributeValue
"0"
Svg
S.circle forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"purple" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.r AttributeValue
"0.03" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cx AttributeValue
"0" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cy AttributeValue
"1"
Svg
S.circle forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"purple" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.r AttributeValue
"0.03" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cx AttributeValue
"1" forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.cy AttributeValue
"1"
curve1 :: Svg
curve1 =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"orchid"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.03"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
curve1Dirs
curve1Dirs :: AttributeValue
curve1Dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0 Double
0.25
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.2 Double
0.2 Double
0 Bool
True Bool
True Double
0.3 Double
0.7
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.2 Double
0.2 Double
0 Bool
True Bool
True Double
0.7 Double
0.7
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.2 Double
0.2 Double
0 Bool
True Bool
True Double
1 Double
0.25
curve2 :: Svg
curve2 =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"crimson"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.015"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
curve2Dirs
curve2Dirs :: AttributeValue
curve2Dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0 Double
0.25
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.125 Double
0.125 Double
0 Bool
True Bool
True Double
1 Double
0.5
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.125 Double
0.125 Double
0 Bool
True Bool
True Double
0 Double
0.75
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.125 Double
0.125 Double
0 Bool
True Bool
True Double
1 Double
1
curve3 :: Svg
curve3 =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"green"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.015"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
curve3Dirs
curve3Dirs :: AttributeValue
curve3Dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Integer
0 Integer
0
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
True Double
0 Double
0.125
forall a. Show a => a -> a -> Path
m Double
1 Double
0.125
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
False Double
1 Double
0.25
forall a. Show a => a -> a -> Path
m Double
0 Double
0.25
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
True Double
0 Double
0.375
forall a. Show a => a -> a -> Path
m Double
1 Double
0.375
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
False Double
1 Double
0.5
forall a. Show a => a -> a -> Path
m Double
0 Double
0.5
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
True Double
0 Double
0.625
forall a. Show a => a -> a -> Path
m Double
1 Double
0.625
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
False Double
1 Double
0.75
forall a. Show a => a -> a -> Path
m Double
0 Double
0.75
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
True Double
0 Double
0.875
forall a. Show a => a -> a -> Path
m Double
1 Double
0.875
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.1 Double
0.1 Double
0 Bool
True Bool
False Double
1 Double
1
curve4 :: Svg
curve4 =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"gold"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.02"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
curve4Dirs
curve4Dirs :: AttributeValue
curve4Dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.5 Double
0
forall a. Show a => a -> a -> a -> a -> a -> a -> Path
c Double
0.1 Double
0.1 Double
0.8 Double
0.1 Double
0.5 Double
0.25
forall a. Show a => a -> a -> Path
l Double
0.5 Double
0.7
forall a. Show a => a -> a -> a -> a -> a -> a -> Path
c Double
0.9 Double
0.8 Double
0.1 Double
0.9 Double
0.5 Double
0.9
forall a. Show a => a -> a -> a -> a -> Path
q Double
0.7 Double
0.9 Double
0.5 Double
0.98
forall a. Show a => a -> a -> Path
l Double
0.5 Double
1
curve5 :: Svg
curve5 =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"teal"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.025"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
curve5Dirs
curve5Dirs :: AttributeValue
curve5Dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.3 Double
0
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.2 Double
0.2 Double
0 Bool
True Bool
False Double
0.7 Double
0
forall a. Show a => a -> a -> Path
m Double
0.3 Double
1
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.2 Double
0.2 Double
0 Bool
True Bool
True Double
0.7 Double
1
curve6 :: Svg
curve6 =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"deepskyblue"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"skyblue"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.01"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
curve6Dirs
curve6Dirs :: AttributeValue
curve6Dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.47 Double
0
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.03 Double
0.03 Double
0 Bool
True Bool
False Double
0.53 Double
0
forall a. Show a => a -> a -> Path
m Double
0.47 Double
1
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
0.03 Double
0.03 Double
0 Bool
True Bool
True Double
0.53 Double
1
curve7 :: Svg
curve7 =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"deeppink"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.03"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeLinecap AttributeValue
"round"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
curve7Dirs
curve7Dirs :: AttributeValue
curve7Dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0.25 Double
0.8
forall a. Show a => a -> a -> Path
l Double
0.25 Double
0.85
forall a. Show a => a -> a -> Path
m Double
0.75 Double
0.8
forall a. Show a => a -> a -> Path
l Double
0.75 Double
0.85
forall a. Show a => a -> a -> Path
m Double
0.25 Double
0.1
forall a. Show a => a -> a -> Path
l Double
0.25 Double
0.15
forall a. Show a => a -> a -> Path
m Double
0.75 Double
0.1
forall a. Show a => a -> a -> Path
l Double
0.75 Double
0.15
airplaneMosaic :: String -> Svg
airplaneMosaic :: [Char] -> Svg
airplaneMosaic [Char]
fillColor =
Svg -> Svg
S.svg
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox AttributeValue
"0 0 2 2"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.height AttributeValue
"300px"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.width AttributeValue
"300px"
forall a b. (a -> b) -> a -> b
$ do
Svg -> Svg
defs forall a b. (a -> b) -> a -> b
$
Svg
basicPlane forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-planeTile"
Svg
plane forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
1 (-Double
0.5))
Svg
plane forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 Double
0.5 )
Svg
plane forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
1 Double
1.5 )
Svg
plane forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 (-Double
0.5) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> a -> a -> a -> AttributeValue
S.matrix Integer
1 Integer
0 Integer
0 (-Integer
1) Integer
0 Integer
1)
Svg
plane forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
1 Double
0.5 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> a -> a -> a -> AttributeValue
S.matrix Integer
1 Integer
0 Integer
0 (-Integer
1) Integer
0 Integer
1)
Svg
plane forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> AttributeValue
translate Double
0 Double
1.5 forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> a -> a -> a -> a -> a -> AttributeValue
S.matrix Integer
1 Integer
0 Integer
0 (-Integer
1) Integer
0 Integer
1)
where
r1 :: Double
r1 = Double
0.5 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
2
y1 :: Double
y1 = Double
1.5 forall a. Num a => a -> a -> a
- Double
0.5 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
2
plane :: Svg
plane =
Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-planeTile"
basicPlane :: Svg
basicPlane =
Svg
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.stroke AttributeValue
"none"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue [Char]
fillColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
basicPlaneDirs
basicPlaneDirs :: AttributeValue
basicPlaneDirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m Double
0 Double
0.5
forall a. Show a => a -> a -> Path
l (Double
1 forall a. Num a => a -> a -> a
- Double
r1) Double
0.5
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
False Bool
True Double
0.5 Double
0
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
False Bool
True Double
r1 Double
0.5
forall a. Show a => a -> a -> Path
l Double
1 Double
0.5
forall a. Show a => a -> a -> Path
l Double
1 Double
y1
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
False Bool
False Double
0.5 Double
1
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
False Bool
False Double
0 Double
y1
Path
S.z