summaryrefslogtreecommitdiffstats
path: root/logo.scm
blob: e4164a32cdea2f025fed1b6b9489bf001d551d52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
;;; This file uses the Guile Picture Language to generate the GNU
;;; Assembly logo variants and favicon.
;;;
;;; The League spartan font is available here:
;;; https://www.theleagueofmoveabletype.com/league-spartan
;;;
;;; After generating the SVG files, any text should be converted to
;;; paths so that viewers don't need to have that font installed.  The
;;; picture language cannot do this yet, so I recommend using
;;; Inkscape manually.
;;;
;;; The logo is released under CC-BY-SA 4.0 or any other license as
;;; agreed upon after a vote by the GNU Assembly.
;;;
;;; ~~ Ricardo

(import (pict)
        (srfi :1))

(define palette
  (list "#073b4c"
        "#118ab2"
        "#06d6a0"
        "#ffd166"
        "#ef476f"))

(define hill-color
  "#ffe9b2")

(define next-color
  (let ((index 0)
        (palette* (list-tail palette 1)))
    (lambda ()
      (set! index (modulo (1+ index)
                          (length palette*)))
      (list-ref palette* index))))

(define* (wildebeest #:key (color "black"))
  (fill
   (path
    (list (move-to '(14 . 5))
          ;; The wildebeest is drawn counter-clockwise, starting from
          ;; the right horn.

          ;; head
          (curve '((-1.6 . 1.2) (-2.5 . 1.4) (-2.5 . 0.7)))
          (curve '((0 . -0.4) (-1.9 . -5.4) (-2.3 . -5.3)))
          (curve '((-0.2 . 0) (2 . 4.1) (0.3 . 5.9)))
          (curve '((-0.9 . 1.2) (-1.9 . 0.8) (-3.2 . 1.1)))
          (curve '((-0.7 . 0.2) (-0.9 . -0.3) (-1 . -0.7)))
          (curve '((-0.3 . -1.9) (0.7 . -6.6) (0.4 . -6)))
          (curve '((-0.67 . 1.32) (-1 . 2.7) (-1.5 . 5.1)))
          (curve '((-0.5 . 2.5) (-1.6 . 2.8) (-2.3 . 4.8)))
          (curve '((-1.5 . 4.1) (-2.1 . 8.9) (-1.1 . 11.3)))
          (curve '((0.5 . 1.3) (0.9 . 1) (2.3 . 0.8)))
          (curve '((0.3 . 0) (0.7 . -0.7) (1 . -0.7)))
          (curve '((0.7 . 0) (1.1 . 0.8) (1.8 . 1.2)))
          (curve '((1.3 . 0.6) (2.5 . 1.5) (2.3 . 1.1)))
          (curve '((-0.2 . -0.3) (-0.1 . -0.9) (0 . -1.2)))
          (curve '((0.2 . -0.7) (0.4 . -0.7) (1.6 . -0.2)))

          ;; right foreleg
          (curve '((0.7 . 0.3) (1.5 . 0.8) (1.7 . 1.1)))
          (curve '((0.2 . 0.3) (0.5 . 0.7) (1.9 . 1.3)))
          (curve '((1 . 0.4) (2.1 . 0.9) (2.1 . 1.1)))
          (curve '((0 . 0.7) (-1 . 1) (-1.8 . 1.7)))
          (curve '((-0.8 . 0.7) (-2.4 . 2) (-2.6 . 2.9)))
          (curve '((-0.2 . 0.7) (2.7 . 4) (3.2 . 4.7)))
          (curve '((0.1 . 0.8) (0.7 . 0.7) (0.9 . 1.7)))
          (curve '((0.3 . 0.8) (0.8 . 1.4) (2.4 . 2.8)))
          (curve '((1.9 . 1.6) (2.5 . 1.6) (2.4 . 1)))
          (curve '((-0.2 . -0.8) (-0.5 . -4.2) (-1.2 . -4.2)))
          (curve '((-0.4 . 0) (-0.9 . 0.6) (-1 . 0.2)))
          (curve '((-0.1 . -0.5) (-0.4 . -0.6) (-0.8 . -0.6)))
          (curve '((-0.2 . 0) (-1.7 . -2.4) (-2 . -2.4)))
          (curve '((-0.3 . -0.3) (-1.7 . -2.8) (-1.7 . -2.8)))

          ;; left foreleg
          (curve '((0 . 0) (2.3 . -1.7) (2.2 . -1.7)))
          (curve '((0 . 0) (-1.2 . 1.7) (-1.9 . 3.5)))
          (curve '((-0.9 . 2.2) (-1.2 . 4.2) (-1.5 . 4.8)))
          (curve '((-0.2 . 0.4) (-0.5 . 0.5) (-1 . 1.3)))
          (curve '((-0.5 . 0.8) (-0.7 . 1.6) (-0.1 . 2.8)))
          (curve '((0.4 . 0.9) (4 . -2.2) (3.4 . -3.7)))
          (curve '((-0.4 . -1.10) (0.5 . -3.4) (0.7 . -4.1)))
          (curve '((0.5 . -1.8) (1.7 . -3.1) (3.2 . -4.4)))
          (curve '((2.5 . -2) (2.2 . -2) (9.1 . -0.7)))

          ;; left hindleg
          (curve '((2.8 . 0.5) (2.8 . 0.2) (4.9 . 2.7)))
          (curve '((1.1 . 1.4) (4 . 3.9) (5.1 . 6.4)))
          (curve '((0.2 . 0.4) (0.3 . 0.7) (0.3 . 1.2)))
          (curve '((-0.4 . 1.5) (-0.3 . 3.7) (-1.4 . 5)))
          (curve '((-0.5 . 1) (-1.5 . 2.1) (0.2 . 1.9)))
          (line-to '(2.2 . 0))
          (line-to '(0.3 . -2.3))
          (curve '((0.3 . -2.2) (0 . -5) (0.4 . -7.2)))
          (curve '((0.1 . -0.2) (-3.8 . -4) (-3.8 . -4.4)))
          (curve '((0 . -0.5) (-0.2 . -2.8) (0 . -2.7)))

          ;; right hindleg
          (curve '((0.2 . 0.1) (0.4 . 3.7) (0.5 . 4.2)))
          (curve '((0.1 . 0.6) (-0.5 . 1.6) (-2.6 . 3.6)))
          (curve '((-3.1 . 3) (-4.3 . 4.6) (-4.4 . 5.4)))
          (curve '((0 . 0.8) (2.2 . 0.7) (2.9 . -0.1)))
          (curve '((0.4 . -0.4) (1 . -2.4) (1 . -2.4)))
          (curve '((1.4 . -1.4) (3 . -3.2) (4.1 . -3.7)))
          (line-to '(1 . -1.9))
          (curve '((0.1 . -1.7) (-1 . -7.2) (0.3 . -8.8)))
          (curve '((0.3 . -0.4) (1.2 . -3) (1.2 . -3)))

          ;; tail
          (curve '((0.5 . 1.8) (4 . 4.7) (4 . 4.7)))
          (curve '((-0.5 . -0.8) (-0.4 . -0.9) (-0.4 . -0.9)))
          (curve '((0 . 0) (2.8 . 0.9) (4.2 . 0.5)))
          (curve '((2 . -0.6) (4.8 . -4) (4.8 . -4)))
          (curve '((-1.3 . 1.1) (-1.3 . 0.8) (-2.5 . 1.2)))
          (curve '((0 . 0) (0.8 . -1) (1.1 . -1.4)))
          (curve '((1 . -1.4) (1.6 . -3.6) (2 . -5.1)))
          (curve '((-0.2 . 0.4) (-0.4 . 0.4) (-0.5 . 0.4)))
          (curve '((-0.2 . -0.6) (1.1 . -3.3) (1.1 . -3.3)))
          (curve '((-0.9 . 0.9) (-1.8 . 1.8) (-2.6 . 3.2)))
          (curve '((-1.3 . 2.2) (-2.4 . 4.7) (-4.4 . 6.2)))
          (curve '((-1.3 . 1) (-4.8 . -2) (-4.8 . -2)))
          (curve '((-1.4 . -0.9) (-1.5 . -2.1) (-1.7 . -2.1)))

          ;; back
          (line-to '(0.1 . 0.2))
          (curve '((0.2 . -2.4) (-3 . -5.4) (-4.4 . -6.3)))
          (curve '((-5.8 . -1.4) (-7.4 . -2.16) (-9.8 . -3.9)))
          (curve '((0 . 0) (2.8 . 0.4) (3.3 . -0.8)))
          (curve '((-1.1 . 0.6) (-3.6 . -0.2) (-5.6 . -1.2)))
          (curve '((-3.5 . -1.9) (-4 . -2.6) (-5.2 . -2.6)))
          (curve '((-0.8 . 0) (-1.9 . -0.2) (-1.9 . -1)))
          (curve '((-0.1 . -0.8) (0.3 . -0.8) (1.5 . -1.2)))
          (curve '((-0.7 . -0.1) (-2.5 . 0.2) (-3.6 . 1.1)))

          (close-path))
    #:stroke-width 0)
   color))

(define parliament
  (begin
    (next-color)(next-color)
    (rotate
     (apply cc-superimpose
            (map (lambda (n)
                   (let ((segment (disk 18 #:color (next-color))))
                     (rotate (expand segment #:right 130)
                             (* n 24))))
                 (iota 8)))
     -35)))

(define hill
  (scale
   (fill
    (polygon '((0 . 30)
               (10 . 30)
               (20 . 25)
               (40 . 20)
               (60 . 5)
               (80 . 10)
               (100 . 30))
             #:border-width 0)
    hill-color)
   2.8))

(define composition
  (expand
   (cc-superimpose
    (expand parliament #:bottom 40)
    (expand hill #:top 20)
    (expand
     (scale (wildebeest #:color (first palette)) 2.8)
     #:left 80))
   #:bottom -50
   #:left -20))

(define composition-with-text
  (expand
   (vc-append
    composition
    (hb-append
     (text "the"
           #:border-width 0
           #:font-family "League spartan Light"
           #:color (first palette)
           #:font-size 32)
     (expand
      (text "gnu"
            #:border-width 0
            #:font-family "League spartan ExtraBold"
            #:color (second palette)
            #:font-size 32)
      #:left 5
      #:right 5)
     (text "assembly"
           #:border-width 0
           #:font-family "League spartan Light"
           #:color (first palette)
           #:font-size 32)))
   #:bottom 10))

(define favicon
  (let ((circles
         (expand (scale parliament 0.5)
                 #:amount -10)))
    (scale
     (cc-superimpose
      (filled-rectangle
       (pict-width circles)
       (pict-height circles)
       #:color "white")
      circles
      (expand (text "g"
                    #:border-width 0
                    #:font-family "League spartan ExtraBold"
                    #:color (first palette)
                    #:font-size 64)
              #:left 5))
     0.3)))

(define small-wildebeest
  (wildebeest #:color (first palette)))

(pict->file composition-with-text "/tmp/logo.svg")
(pict->file composition "/tmp/logo-small.svg")
(pict->file favicon "/tmp/favicon.svg")
(pict->file small-wildebeest "/tmp/wildebeest.svg")