{-# LANGUAGE OverloadedStrings #-}
module Icons.Religion where
import Data.String
import Text.Blaze.Svg11 ((!))
import Text.Blaze.Svg11 as S
import Text.Blaze.Svg11.Attributes as A
import Core.Geometry
import Core.Utils
svgReligion :: [ (String , S.Svg) ]
svgReligion :: [(String, MarkupM ())]
svgReligion =
[ (,) String
"xp" MarkupM ()
xp
, (,) String
"taijitu" (String -> String -> MarkupM ()
taijitu String
"black" String
"white")
, (,) String
"crossLatin" MarkupM ()
crossLatin
, (,) String
"crossOrthodox" MarkupM ()
crossOrthodox
, (,) String
"crescentAndStar" MarkupM ()
crescentAndStar
, (,) String
"starOfDavid" MarkupM ()
starOfDavid
, (,) String
"exampleHexagram" ((Int, Int, Int, Int, Int, Int) -> MarkupM ()
iChingHexagram (Int
8,Int
8,Int
7,Int
8,Int
7,Int
7))
]
xp :: Svg
xp :: MarkupM ()
xp =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
rho
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fillRule AttributeValue
"evenodd"
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
chi
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.transform (forall a. Show a => a -> a -> a -> AttributeValue
rotateAround Integer
45 Integer
0 Integer
0)
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
alpha
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
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"
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
omega
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill AttributeValue
"none"
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"
where
w :: Double
w = Double
0.07
k1 :: Double
k1 = Double
0.5
k2 :: Double
k2 = Double
0.96
k3 :: Double
k3 = Double
0.17
r1 :: Double
r1 = Double
0.2
a :: Double
a = Double
0.3
chi :: AttributeValue
chi = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m ( -Double
w) ( -Double
w)
forall a. Show a => a -> a -> Path
l ( -Double
w) (-Double
k1forall a. Num a => a -> a -> a
+Double
w)
forall a. Show a => a -> a -> a -> a -> Path
q ( -Double
w) (-Double
k1 ) ( -Double
2forall a. Num a => a -> a -> a
*Double
w) (-Double
k1 )
forall a. Show a => a -> a -> Path
l ( Double
2forall a. Num a => a -> a -> a
*Double
w) (-Double
k1 )
forall a. Show a => a -> a -> a -> a -> Path
q ( Double
w) (-Double
k1 ) ( Double
w) (-Double
k1forall a. Num a => a -> a -> a
+Double
w)
forall a. Show a => a -> a -> Path
l ( Double
w) ( -Double
w)
forall a. Show a => a -> a -> Path
l ( Double
k1forall a. Num a => a -> a -> a
-Double
w) ( -Double
w)
forall a. Show a => a -> a -> a -> a -> Path
q ( Double
k1 ) ( -Double
w) ( Double
k1 ) ( -Double
2forall a. Num a => a -> a -> a
*Double
w)
forall a. Show a => a -> a -> Path
l ( Double
k1 ) ( Double
2forall a. Num a => a -> a -> a
*Double
w)
forall a. Show a => a -> a -> a -> a -> Path
q ( Double
k1 ) ( Double
w) ( Double
k1forall a. Num a => a -> a -> a
-Double
w) ( Double
w)
forall a. Show a => a -> a -> Path
l ( Double
w) ( Double
w)
forall a. Show a => a -> a -> Path
l ( Double
w) ( Double
k1forall a. Num a => a -> a -> a
-Double
w)
forall a. Show a => a -> a -> a -> a -> Path
q ( Double
w) ( Double
k1 ) ( Double
2forall a. Num a => a -> a -> a
*Double
w) ( Double
k1 )
forall a. Show a => a -> a -> Path
l ( -Double
2forall a. Num a => a -> a -> a
*Double
w) ( Double
k1 )
forall a. Show a => a -> a -> a -> a -> Path
q ( -Double
w) ( Double
k1 ) ( -Double
w) ( Double
k1forall a. Num a => a -> a -> a
-Double
w)
forall a. Show a => a -> a -> Path
l ( -Double
w) ( Double
w)
forall a. Show a => a -> a -> Path
l (-Double
k1forall a. Num a => a -> a -> a
+Double
w) ( Double
w)
forall a. Show a => a -> a -> a -> a -> Path
q (-Double
k1 ) ( Double
w) (-Double
k1 ) ( Double
2forall a. Num a => a -> a -> a
*Double
w)
forall a. Show a => a -> a -> Path
l (-Double
k1 ) ( -Double
2forall a. Num a => a -> a -> a
*Double
w)
forall a. Show a => a -> a -> a -> a -> Path
q (-Double
k1 ) ( -Double
w) (-Double
k1forall a. Num a => a -> a -> a
+Double
w) ( -Double
w)
Path
S.z
rho :: AttributeValue
rho = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m ( Double
w) (-Double
k2 )
forall a. Show a => a -> a -> Path
l ( -Double
2forall a. Num a => a -> a -> a
*Double
w) (-Double
k2 )
forall a. Show a => a -> a -> a -> a -> Path
q ( -Double
w) (-Double
k2 ) ( -Double
w) (-Double
k2forall a. Num a => a -> a -> a
+Double
w)
forall a. Show a => a -> a -> Path
l ( -Double
w) ( Double
k2forall a. Num a => a -> a -> a
-Double
w)
forall a. Show a => a -> a -> a -> a -> Path
q ( -Double
w) ( Double
k2 ) ( -Double
2forall a. Num a => a -> a -> a
*Double
w) ( Double
k2)
forall a. Show a => a -> a -> Path
l ( Double
2forall a. Num a => a -> a -> a
*Double
w) ( Double
k2 )
forall a. Show a => a -> a -> a -> a -> Path
q ( Double
w) ( Double
k2 ) ( Double
w) ( Double
k2forall a. Num a => a -> a -> a
-Double
w)
forall a. Show a => a -> a -> Path
l ( Double
w) (-Double
k2forall a. Num a => a -> a -> a
+Double
2forall a. Num a => a -> a -> a
*Double
r1)
forall a. Show a => a -> a -> Path
l ( Double
k3forall a. Num a => a -> a -> a
+Double
w) (-Double
k2forall a. Num a => a -> a -> a
+Double
2forall a. Num a => a -> a -> a
*Double
r1)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
True Bool
False ( Double
k3forall a. Num a => a -> a -> a
+Double
w) (-Double
k2)
Path
S.z
forall a. Show a => a -> a -> Path
m ( Double
w) (-Double
k2forall a. Num a => a -> a -> a
+Double
2forall a. Num a => a -> a -> a
*Double
r1 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> a -> a -> a -> a -> Path
c (Double
2forall a. Num a => a -> a -> a
*Double
k3forall a. Num a => a -> a -> a
+Double
w) (-Double
k2forall a. Num a => a -> a -> a
+Double
2forall a. Num a => a -> a -> a
*Double
r1) (Double
2forall a. Num a => a -> a -> a
*Double
k3forall a. Num a => a -> a -> a
+Double
w) (-Double
k2) ( Double
w) (-Double
k2 forall a. Num a => a -> a -> a
+ Double
w)
Path
S.z
alpha :: AttributeValue
alpha = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Double
0.7forall a. Num a => a -> a -> a
-Double
aforall a. Fractional a => a -> a -> a
/Double
2) ( Double
aforall a. Fractional a => a -> a -> a
/Double
2)
forall a. Show a => a -> a -> Path
l (-Double
0.7 ) (-Double
aforall a. Fractional a => a -> a -> a
/Double
2)
forall a. Show a => a -> a -> Path
l (-Double
0.7forall a. Num a => a -> a -> a
+Double
aforall a. Fractional a => a -> a -> a
/Double
2) ( Double
aforall a. Fractional a => a -> a -> a
/Double
2)
forall a. Show a => a -> a -> Path
m (-Double
0.7forall a. Num a => a -> a -> a
-Double
aforall a. Fractional a => a -> a -> a
/Double
4) ( Double
0 )
forall a. Show a => a -> a -> Path
l (-Double
0.7 ) ( Double
aforall a. Fractional a => a -> a -> a
/Double
4)
forall a. Show a => a -> a -> Path
l (-Double
0.7forall a. Num a => a -> a -> a
+Double
aforall a. Fractional a => a -> a -> a
/Double
4) ( Double
0 )
omega :: AttributeValue
omega = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m ( Double
0.7forall a. Num a => a -> a -> a
-Double
aforall a. Fractional a => a -> a -> a
/Double
2) ( Double
aforall a. Fractional a => a -> a -> a
/Double
2)
forall a. Show a => a -> a -> Path
l ( Double
0.7forall a. Num a => a -> a -> a
-Double
aforall a. Fractional a => a -> a -> a
/Double
5) ( Double
aforall a. Fractional a => a -> a -> a
/Double
2)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa (Double
aforall a. Fractional a => a -> a -> a
/Double
2) (Double
aforall a. Fractional a => a -> a -> a
/Double
2) Double
0 Bool
True Bool
True (Double
0.7forall a. Num a => a -> a -> a
+Double
aforall a. Fractional a => a -> a -> a
/Double
5) (Double
aforall a. Fractional a => a -> a -> a
/Double
2)
forall a. Show a => a -> a -> Path
l ( Double
0.7forall a. Num a => a -> a -> a
+Double
aforall a. Fractional a => a -> a -> a
/Double
2) ( Double
aforall a. Fractional a => a -> a -> a
/Double
2)
taijitu :: String -> String -> Svg
taijitu :: String -> String -> MarkupM ()
taijitu String
yinColor String
yangColor =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
outerCircle
MarkupM ()
yin
MarkupM ()
yangDot
MarkupM ()
yinDot
where
r1 :: Float
r1 = Float
0.92
r1m :: Float
r1m = Float
0.5 forall a. Num a => a -> a -> a
* Float
r1
r2 :: Float
r2 = Float
r1 forall a. Fractional a => a -> a -> a
/ Float
6
outerCircle :: MarkupM ()
outerCircle =
MarkupM ()
S.circle
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.cx (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.cy (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.r (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
r1)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue String
yangColor)
yin :: MarkupM ()
yin =
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fill (forall a. ToValue a => a -> AttributeValue
S.toValue String
yinColor)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
yinDirs
yinDirs :: AttributeValue
yinDirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m ( -Float
r1) Float
0
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
r1m Float
r1m Float
0 Bool
True Bool
False Float
0 Float
0
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
r1m Float
r1m Float
0 Bool
True Bool
True ( Float
r1) Float
0
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Float
r1 Float
r1 Float
0 Bool
True Bool
True (-Float
r1) Float
0
Path
S.z
yangDot :: MarkupM ()
yangDot =
MarkupM ()
S.circle
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.cx (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0 forall a. Num a => a -> a -> a
+ Float
r1m)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.cy (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0 )
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.r (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
r2)
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 String
yangColor)
yinDot :: MarkupM ()
yinDot =
MarkupM ()
S.circle
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.cx (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0 forall a. Num a => a -> a -> a
- Float
r1m)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.cy (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0 )
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.r (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
r2)
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 String
yinColor)
crossLatin :: Svg
crossLatin :: MarkupM ()
crossLatin =
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs
where
w :: Double
w = Double
0.1
k1 :: Double
k1 = Double
0.9
k2 :: Double
k2 = Double
k1 forall a. Num a => a -> a -> a
* Double
3forall a. Fractional a => a -> a -> a
/Double
4
km :: Double
km = -Double
k1 forall a. Num a => a -> a -> a
+ Double
k1 forall a. Num a => a -> a -> a
* Double
2forall a. Fractional a => a -> a -> a
/Double
3
dirs :: AttributeValue
dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (-Double
w ) (-Double
k1 )
forall a. Show a => a -> a -> Path
l (-Double
w ) ( Double
km forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (-Double
k2) ( Double
km forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (-Double
k2) ( Double
km forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (-Double
w ) ( Double
km forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (-Double
w ) ( Double
k1 )
forall a. Show a => a -> a -> Path
l ( Double
w ) ( Double
k1 )
forall a. Show a => a -> a -> Path
l ( Double
w ) ( Double
km forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l ( Double
k2) ( Double
km forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l ( Double
k2) ( Double
km forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l ( Double
w ) ( Double
km forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l ( Double
w ) (-Double
k1 )
Path
S.z
crossOrthodox :: Svg
crossOrthodox :: MarkupM ()
crossOrthodox =
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
dirs
where
w :: Double
w = Double
0.1
y1 :: Double
y1 = -Double
0.84
y2 :: Double
y2 = Double
y1 forall a. Num a => a -> a -> a
+ Double
2forall a. Num a => a -> a -> a
*Double
w
y3 :: Double
y3 = Double
y1 forall a. Num a => a -> a -> a
+ Double
6forall a. Num a => a -> a -> a
*Double
w
y4 :: Double
y4 = Double
0.6
y5 :: Double
y5 = -Double
y1
x1 :: Double
x1 = (Double
y1 forall a. Num a => a -> a -> a
+ Double
w) forall a. Num a => a -> a -> a
* Double
0.618 forall a. Num a => a -> a -> a
- Double
w
x2 :: Double
x2 = Double
x1 forall a. Fractional a => a -> a -> a
/ Double
2
x3 :: Double
x3 = Double
0
x4 :: Double
x4 = Double
x5 forall a. Fractional a => a -> a -> a
/ Double
2
x5 :: Double
x5 = -Double
x1
α :: Double
α = forall a. Floating a => a
pi forall a. Fractional a => a -> a -> a
/ Double
3
ct :: Double
ct = Double
1 forall a. Fractional a => a -> a -> a
/ forall a. Floating a => a -> a
tan Double
α
dirs :: AttributeValue
dirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y3 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x1 forall a. Num a => a -> a -> a
- Double
w) (Double
y3 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x1 forall a. Num a => a -> a -> a
- Double
w) (Double
y3 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y3 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y2 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x2 forall a. Num a => a -> a -> a
- Double
w) (Double
y2 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x2 forall a. Num a => a -> a -> a
- Double
w) (Double
y2 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y2 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y1 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y1 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y2 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) (Double
y2 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) (Double
y2 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y2 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y3 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x5 forall a. Num a => a -> a -> a
+ Double
w) (Double
y3 forall a. Num a => a -> a -> a
- Double
w)
forall a. Show a => a -> a -> Path
l (Double
x5 forall a. Num a => a -> a -> a
+ Double
w) (Double
y3 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y3 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y4 forall a. Num a => a -> a -> a
- Double
w forall a. Num a => a -> a -> a
+ Double
w forall a. Num a => a -> a -> a
* Double
ct)
forall a. Show a => a -> a -> Path
l (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) (Double
y4 forall a. Num a => a -> a -> a
- Double
w forall a. Num a => a -> a -> a
+ (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) forall a. Num a => a -> a -> a
* Double
ct)
forall a. Show a => a -> a -> Path
l (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) (Double
y4 forall a. Num a => a -> a -> a
+ Double
w forall a. Num a => a -> a -> a
+ (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) forall a. Num a => a -> a -> a
* Double
ct)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y4 forall a. Num a => a -> a -> a
+ Double
w forall a. Num a => a -> a -> a
+ Double
w forall a. Num a => a -> a -> a
* Double
ct)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
+ Double
w) (Double
y5 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y5 forall a. Num a => a -> a -> a
+ Double
w)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y4 forall a. Num a => a -> a -> a
+ Double
w forall a. Num a => a -> a -> a
- Double
w forall a. Num a => a -> a -> a
* Double
ct)
forall a. Show a => a -> a -> Path
l (Double
x2 forall a. Num a => a -> a -> a
- Double
w) (Double
y4 forall a. Num a => a -> a -> a
+ Double
w forall a. Num a => a -> a -> a
- (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) forall a. Num a => a -> a -> a
* Double
ct)
forall a. Show a => a -> a -> Path
l (Double
x2 forall a. Num a => a -> a -> a
- Double
w) (Double
y4 forall a. Num a => a -> a -> a
- Double
w forall a. Num a => a -> a -> a
- (Double
x4 forall a. Num a => a -> a -> a
+ Double
w) forall a. Num a => a -> a -> a
* Double
ct)
forall a. Show a => a -> a -> Path
l (Double
x3 forall a. Num a => a -> a -> a
- Double
w) (Double
y4 forall a. Num a => a -> a -> a
- Double
w forall a. Num a => a -> a -> a
- Double
w forall a. Num a => a -> a -> a
* Double
ct)
Path
S.z
crescentAndStar :: Svg
crescentAndStar :: MarkupM ()
crescentAndStar =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path
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
moonDirs
Int -> Float -> (Float, Float) -> MarkupM ()
starRegular Int
5 Float
0.3 (Float
0.55, Float
0.05)
where
kx :: Double
kx = Double
0.55
ky :: Double
ky = Double
0.55
r1 :: Double
r1 = Double
0.8
r2 :: Double
r2 = Double
0.65
moonDirs :: AttributeValue
moonDirs = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall a. Show a => a -> a -> Path
m ( Double
kx) (-Double
ky)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r1 Double
r1 Double
0 Bool
True Bool
False ( Double
kx) ( Double
ky)
forall a. Show a => a -> a -> a -> Bool -> Bool -> a -> a -> Path
aa Double
r2 Double
r2 Double
0 Bool
True Bool
True ( Double
kx) (-Double
ky)
Path
S.z
starOfDavid :: Svg
starOfDavid :: MarkupM ()
starOfDavid =
Int -> Float -> (Float, Float) -> MarkupM ()
starPolygonFirstSpecies Int
6 Float
0.9 (Float
0,Float
0)
iChingHexagram :: (Int,Int,Int,Int,Int,Int) -> Svg
iChingHexagram :: (Int, Int, Int, Int, Int, Int) -> MarkupM ()
iChingHexagram (Int
n1,Int
n2,Int
n3,Int
n4,Int
n5,Int
n6) =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
MarkupM ()
S.path
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.d AttributeValue
lines
if Bool
doNotPrintNumbers
then forall a. Monoid a => a
mempty
else MarkupM ()
numbers
where
doNotPrintNumbers :: Bool
doNotPrintNumbers =
(\Int
k -> Int
k forall a. Eq a => a -> a -> Bool
== Int
0 Bool -> Bool -> Bool
|| Int
k forall a. Eq a => a -> a -> Bool
== Int
1) forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
`all` [Int
n1,Int
n2,Int
n3,Int
n4,Int
n5,Int
n6]
x1 :: Float
x1 = Float
0.7
x2 :: Float
x2 = Float
0.1
ky :: Float
ky = Float
2 forall a. Fractional a => a -> a -> a
/ Float
14
line :: a -> Float -> Path
line a
k Float
y =
if (forall a. Integral a => a -> Bool
odd a
k)
then forall a. Show a => a -> a -> Path
m (-Float
x1) Float
y forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> forall a. Show a => a -> a -> Path
l Float
x1 Float
y
else forall a. Show a => a -> a -> Path
m (-Float
x1) Float
y forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> forall a. Show a => a -> a -> Path
l (-Float
x2) Float
y forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> forall a. Show a => a -> a -> Path
m Float
x2 Float
y forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> forall a. Show a => a -> a -> Path
l Float
x1 Float
y
lines :: AttributeValue
lines = Path -> AttributeValue
mkPath forall a b. (a -> b) -> a -> b
$ do
forall {a}. Integral a => a -> Float -> Path
line Int
n6 (-Float
5forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Integral a => a -> Float -> Path
line Int
n5 (-Float
3forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Integral a => a -> Float -> Path
line Int
n4 (-Float
1forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Integral a => a -> Float -> Path
line Int
n3 ( Float
1forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Integral a => a -> Float -> Path
line Int
n2 ( Float
3forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Integral a => a -> Float -> Path
line Int
n1 ( Float
5forall a. Num a => a -> a -> a
*Float
ky)
number :: a -> Float -> MarkupM ()
number a
k Float
y =
MarkupM () -> MarkupM ()
S.text_ (forall a. IsString a => String -> a
fromString forall a b. (a -> b) -> a -> b
$ forall a. Show a => a -> String
show a
k)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.x (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
0.85)
forall h. Attributable h => h -> Attribute -> h
! (AttributeValue -> Attribute
A.y (AttributeValue -> Attribute) -> Float -> Attribute
.: Float
y)
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.dominantBaseline AttributeValue
"central"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.textAnchor AttributeValue
"middle"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fontFamily AttributeValue
"Times New Roman, serif"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.fontSize AttributeValue
"0.2"
forall h. Attributable h => h -> Attribute -> h
! AttributeValue -> Attribute
A.strokeWidth AttributeValue
"0"
numbers :: MarkupM ()
numbers =
MarkupM () -> MarkupM ()
S.g forall a b. (a -> b) -> a -> b
$ do
forall {a}. Show a => a -> Float -> MarkupM ()
number Int
n6 (-Float
5forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Show a => a -> Float -> MarkupM ()
number Int
n5 (-Float
3forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Show a => a -> Float -> MarkupM ()
number Int
n4 (-Float
1forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Show a => a -> Float -> MarkupM ()
number Int
n3 ( Float
1forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Show a => a -> Float -> MarkupM ()
number Int
n2 ( Float
3forall a. Num a => a -> a -> a
*Float
ky)
forall {a}. Show a => a -> Float -> MarkupM ()
number Int
n1 ( Float
5forall a. Num a => a -> a -> a
*Float
ky)