{-# LANGUAGE     OverloadedStrings       #-}



{- |
This module exports images that can be used as 
base tile to build a mosaic. This can be achieved 
using them with CSS as @background-image@ 
with @background-repeat: repeat@

They are already wrapped in the @\<svg\>@ tag, which means:

  * They are not composible.
  * They are ready for use, no wrapping work needed.
  * To build a perfectly matching mosaic, you must respect
  the width-to-height ratio (specific for every tile function), otherwise
  the resulting will have undesired gaps inbetween.

To fully grasp the potential, check this page: [https://ramiropastor.es/svg-icons](https://ramiropastor.es/svg-icons)
-}
module SvgIcons.Images.Mosaics 
  ( mosaicSample
  , nazariMosaic
  , triReligiousMosaic
  , hexagonsMosaic
  , beehiveMosaic
  , lemonsMosaic
  , arabicMosaic
  , cloudsMosaic
  , hexMosaic
  , arrowsMosaic
  , wiresMosaic
  , curvesMosaic
  , airplaneMosaic
  , octagonsMosaic
  , pentagonsMosaic
  ) where

import           Data.List (intersperse)
import           Text.Blaze.Svg11 ((!))
import           Text.Blaze.Svg11 as S
import           Text.Blaze.Svg11.Attributes as A

import SvgIcons.Core.Geometry
import SvgIcons.Core.Utils


{- |
A list of all mosaics from this module, evaluated with
test colors. Please use more sensible colors in order to
avoid eye injuries on the viewer.

>mosaicSample :: [ (String , S.Svg) ]
>mosaicSample =
>  [ (,) "nazariMosaic"       (nazariMosaic "orange" "purple")
>  , (,) "triReligiousMosaic" (triReligiousMosaic "blue" "orange" "green")
>  , (,) "hexagonsMosaic"     (hexagonsMosaic "navy" "none")
>  , (,) "beehiveMosaic"       beehiveMosaic
>  , (,) "lemonsMosaic"       (lemonsMosaic "gold")
>  , (,) "arabicMosaic"       (arabicMosaic "blue" "brown")
>  , (,) "cloudsMosaic"       (cloudsMosaic "silver" "white")
>  , (,) "hexMosaic"          (hexMosaic    "limegreen")
>  , (,) "arrowsMosaic"       (arrowsMosaic "orange")
>  , (,) "wiresMosaic"        (wiresMosaic  "gray")
>  , (,) "curvesMosaic"        curvesMosaic
>  , (,) "airplaneMosaic"     (airplaneMosaic "deepskyblue")
>  , (,) "octagonsMosaic"     (octagonsMosaic "lightgray" "chocolate")
>  ]
-}
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]
"cloudsMosaic"       ([Char] -> [Char] -> Svg
cloudsMosaic [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")
  , (,) [Char]
"octagonsMosaic"     ([Char] -> [Char] -> Svg
octagonsMosaic [Char]
"lightgray" [Char]
"chocolate")
  , (,) [Char]
"pentagonsMosaic"    ([Char] -> [Char] -> Svg
pentagonsMosaic [Char]
"deeppink" [Char]
"black")
  ]



--------------------------------------------------------------------------------


{- |
![nazari mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/nazariMosaic.svg)

Ratio between width and height is: \(h = \sqrt{3} \cdot w\)
-}
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



{- |
![tri-religious mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/triReligiousMosaic.svg)

Ratio between width and height is: \(h = \sqrt{3} \cdot w\)
-}
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



{- |
![hexagons mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/hexagonsMosaic.svg)

Ratio between width and height is: \(h = \sqrt{3} \cdot w\)
-}
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                        -- apotema

    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         -- radio

    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   -- proyeccion en el eje vertical

    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)   -- plus epsilon

      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)



{- |
![beehive mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/beehiveMosaic.svg)

Ratio between width and height is: \(h = \sqrt{3} \cdot w\)
-}
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                        -- apotema

    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         -- radio

    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   -- proyeccion en el eje vertical

    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)   -- plus epsilon

        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
        -- ! A.spreadmethod "reflect"

        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)"



{- |
![lemons mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/lemonsMosaic.svg)

Ratio between width and height is: \(w = 0.85 \cdot h\)
-}
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     -- k must be lower than r1

    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



{- |
![arabic mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/arabicMosaic.svg)

Ratio between width and height is: \(h = w\)
-}
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



{- |
![clouds mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/cloudsMosaic.svg)

Ratio between width and height is: \(h = w\)
-}
cloudsMosaic :: String -> String -> Svg
cloudsMosaic :: [Char] -> [Char] -> Svg
cloudsMosaic [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



{- |
![hex mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/hexMosaic.svg)

Ratio between width and height is: \(w = \sqrt{3} \cdot h\)
-}
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  -- side of base hex

    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)



{- |
![arrows mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/arrowsMosaic.svg)

Ratio between width and height is: \(h = \sqrt{3} \cdot w\)
-}
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
  


{- |
![wires mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/wiresMosaic.svg)

Ratio between width and height is: \(h = w\)
-}
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   -- CENTER OF THE FLOWER

      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
      -- l   0.39   0.30

      -- l   0.37   0.30

      -- l   0.38   0.31

      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



{- |
![curves mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/curvesMosaic.svg)

Ratio between width and height is: \(h = w\)
-}
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
      -- m   0     0

      -- l   0.16  0

      -- m   0.84  0

      -- l   1     0

    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



{- |
![airplane mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/airplaneMosaic.svg)

Ratio between width and height is: \(h =  w\)
-}
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



{- |
![octagons mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/octagonsMosaic.svg)

Ratio between width and height is: \(h =  w\)
-}
octagonsMosaic :: String -> String -> Svg
octagonsMosaic :: [Char] -> [Char] -> Svg
octagonsMosaic [Char]
fillColor [Char]
strkColor =
    Svg -> Svg
svg
      forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.viewbox AttributeValue
"0 0 4 4"
      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
S.path
          forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0.2"
          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
dirs
  where
    dirs :: AttributeValue
dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
      forall a. Show a => a -> a -> Path
m  Integer
1  Integer
1
      forall a. Show a => a -> a -> Path
l  Integer
3  Integer
1
      forall a. Show a => a -> a -> Path
l  Integer
3  Integer
3
      forall a. Show a => a -> a -> Path
l  Integer
1  Integer
3
      Path
S.z
      forall a. Show a => a -> a -> Path
m  Integer
1  Integer
1
      forall a. Show a => a -> a -> Path
l  Integer
0  Integer
0
      forall a. Show a => a -> a -> Path
m  Integer
3  Integer
3
      forall a. Show a => a -> a -> Path
l  Integer
4  Integer
4
      forall a. Show a => a -> a -> Path
m  Integer
3  Integer
1
      forall a. Show a => a -> a -> Path
l  Integer
4  Integer
0
      forall a. Show a => a -> a -> Path
m  Integer
1  Integer
3
      forall a. Show a => a -> a -> Path
l  Integer
0  Integer
4



{- |
![pentagons mosaic](https://raw.githubusercontent.com/RamiroPastor/SvgIcons/main/svg/images/mosaics/pentagonsMosaic.svg)

Ratio between width and height is: \(w = \sqrt{3} \cdot h\)
-}
pentagonsMosaic :: String -> String -> Svg
pentagonsMosaic :: [Char] -> [Char] -> Svg
pentagonsMosaic [Char]
fillColor [Char]
strkColor =
    Svg -> Svg
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 " forall a. [a] -> [a] -> [a]
++ (forall a. Show a => a -> [Char]
show Double
x0) forall a. [a] -> [a] -> [a]
++ [Char]
" " forall a. [a] -> [a] -> [a]
++ (forall a. Show a => a -> [Char]
show Double
y0))
      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 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
S.defs forall a b. (a -> b) -> a -> b
$
          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.strokeWidth AttributeValue
"0.15"
            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.strokeLinejoin AttributeValue
"round"
            forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.id_ AttributeValue
"HaskellSvgIcons-pentagonTile"
            forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
pentagonDirs
        Svg -> Svg
S.g forall a b. (a -> b) -> a -> b
$ do
          ---

          Svg
pentagon
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate     Double
h0  ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate     Double
h0  ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (  -Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (  -Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate      Double
0  ( Double
7forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (                                 forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate     Double
h0  ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate     Double
h0  ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
2forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
2forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate      Double
0  ( Double
7forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate     Double
h0  ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate     Double
h0  ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
2forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
2forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0  ))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (Double
15forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
4forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
4forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
2forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
2forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (Double
15forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
4forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
4forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0  ))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
5forall a. Num a => a -> a -> a
*Double
h0) (Double
11forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
5forall a. Num a => a -> a -> a
*Double
h0) (Double
11forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
3forall a. Num a => a -> a -> a
*Double
h0) (Double
15forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
6forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
6forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
4forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
4forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
5forall a. Num a => a -> a -> a
*Double
h0) (Double
11forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
5forall a. Num a => a -> a -> a
*Double
h0) (Double
11forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
6forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
6forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0  ))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
7forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
7forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
5forall a. Num a => a -> a -> a
*Double
h0) (Double
11forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
5forall a. Num a => a -> a -> a
*Double
h0) (Double
11forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
6forall a. Num a => a -> a -> a
*Double
h0) ( Double
8forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
6forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
6forall a. Num a => a -> a -> a
*Double
h0) (   Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
7forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
7forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
8forall a. Num a => a -> a -> a
*Double
h0) ( Double
6forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
8forall a. Num a => a -> a -> a
*Double
h0) ( Double
6forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
8forall a. Num a => a -> a -> a
*Double
h0) (  -Double
l0  ))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
9forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
9forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
7forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
7forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
8forall a. Num a => a -> a -> a
*Double
h0) ( Double
6forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
8forall a. Num a => a -> a -> a
*Double
h0) ( Double
6forall a. Num a => a -> a -> a
*Double
l0  ))                )
          --- 

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
9forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
9forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
10forall a. Num a => a -> a -> a
*Double
h0) ( Double
4forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
10forall a. Num a => a -> a -> a
*Double
h0) ( Double
4forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
8forall a. Num a => a -> a -> a
*Double
h0) ( Double
6forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
8forall a. Num a => a -> a -> a
*Double
h0) ( Double
6forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          ---

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (  -Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
9forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate ( Double
9forall a. Num a => a -> a -> a
*Double
h0) ( Double
3forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
10forall a. Num a => a -> a -> a
*Double
h0) ( Double
4forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
10forall a. Num a => a -> a -> a
*Double
h0) ( Double
4forall a. Num a => a -> a -> a
*Double
l0  ))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (Double
13forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (Double
13forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          ---

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (  -Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
12forall a. Num a => a -> a -> a
*Double
h0) ( Double
2forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
12forall a. Num a => a -> a -> a
*Double
h0) ( Double
2forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
10forall a. Num a => a -> a -> a
*Double
h0) ( Double
4forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
10forall a. Num a => a -> a -> a
*Double
h0) ( Double
4forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (Double
13forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (Double
13forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          ---

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (  -Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
12forall a. Num a => a -> a -> a
*Double
h0) ( Double
2forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
12forall a. Num a => a -> a -> a
*Double
h0) ( Double
2forall a. Num a => a -> a -> a
*Double
l0  ))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
13forall a. Num a => a -> a -> a
*Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
13forall a. Num a => a -> a -> a
*Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (Double
13forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
11forall a. Num a => a -> a -> a
*Double
h0) (Double
13forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          ---

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
14forall a. Num a => a -> a -> a
*Double
h0) ( Double
0forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
12forall a. Num a => a -> a -> a
*Double
h0) ( Double
2forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
12forall a. Num a => a -> a -> a
*Double
h0) ( Double
2forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
13forall a. Num a => a -> a -> a
*Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
13forall a. Num a => a -> a -> a
*Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
14forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          ---

          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
14forall a. Num a => a -> a -> a
*Double
h0) ( Double
0forall a. Num a => a -> a -> a
*Double
l0  ))                )
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
15forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
120)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
15forall a. Num a => a -> a -> a
*Double
h0) ( Double
5forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate  Integer
60)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
13forall a. Num a => a -> a -> a
*Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
240)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
13forall a. Num a => a -> a -> a
*Double
h0) ( Double
9forall a. Num a => a -> a -> a
*Double
l0forall a. Fractional a => a -> a -> a
/Double
2)) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
300)
          Svg
pentagon forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform ((forall a. Show a => a -> a -> AttributeValue
translate (Double
14forall a. Num a => a -> a -> a
*Double
h0) ( Double
7forall a. Num a => a -> a -> a
*Double
l0  )) forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> AttributeValue
S.rotate Integer
180)
  where
    pentagon :: Svg
pentagon = 
      Svg
S.use forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.xlinkHref AttributeValue
"#HaskellSvgIcons-pentagonTile"
    r0 :: Double
r0 = Double
1
    a0 :: Double
a0 = Double
r0 forall a. Fractional a => a -> a -> a
/ Double
2
    l0 :: Double
l0 = Double
r0 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3
    h0 :: Double
h0 = Double
r0 forall a. Num a => a -> a -> a
+ Double
a0
    y0 :: Double
y0 = Double
l0 forall a. Num a => a -> a -> a
* Double
7
    x0 :: Double
x0 = Double
y0 forall a. Num a => a -> a -> a
* forall a. Floating a => a -> a
sqrt Double
3
    pentagonDirs :: AttributeValue
pentagonDirs = 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 -> Path
lr (-Double
r0)   Double
l0
      forall a. Show a => a -> a -> Path
lr   Double
a0   (Double
l0forall a. Fractional a => a -> a -> a
/Double
2)
      forall a. Show a => a -> a -> Path
lr   Double
r0     Double
0
      forall a. Show a => a -> a -> Path
lr   Double
a0  (-Double
l0forall a. Fractional a => a -> a -> a
/Double
2)
      forall a. Show a => a -> a -> Path
lr (-Double
r0) (-Double
l0)
      Path
S.z