Skip to content

Commit 772b3cf

Browse files
authored
Create adafruit_logo_vector.py
1 parent 3804a15 commit 772b3cf

1 file changed

Lines changed: 223 additions & 0 deletions

File tree

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
### Adafruit logo
2+
3+
"""Adafruit logo created from bitmap,
4+
vectorised and flattened to straight lines by Inkscape
5+
then points extracte from SVG data.
6+
(Other route is to ask Adafruit for vector version!)
7+
"""
8+
9+
### pylint 2.3.1 has some strange opinions on data structure indentation here
10+
### and this conflicts with version 1.9.2
11+
### pylint: disable=invalid-name,bad-continuation
12+
offset_x = -10
13+
offset_y = 9
14+
15+
data = [
16+
# Removing the box outline
17+
# Group 1
18+
# (2.9962184, 251.49811),
19+
# (2.9962184, 1.4981075),
20+
# (252.99622, 1.4981075),
21+
# (502.99622, 1.4981075),
22+
# (502.99622, 251.49811),
23+
# (502.99622, 501.49811),
24+
# (252.99622, 501.49811),
25+
# (2.9962184, 501.49811),
26+
# (2.9962184, 251.49811),
27+
28+
# Outline of the flower followed by the five
29+
# Group 2
30+
[(342.49622, 454.21659),
31+
(346.959242969, 451.054080156),
32+
(349.16935125, 444.29346125),
33+
(349.74007, 396.99811),
34+
(349.42067, 348.99811),
35+
(346.15117, 331.03534),
36+
(341.803838594, 322.622872031),
37+
(336.10557625, 315.17921375),
38+
(320.50984, 301.96305),
39+
(315.24595, 297.9209),
40+
(322.89745, 300.16203),
41+
(338.78867125, 303.15162),
42+
(354.51274, 302.19987),
43+
(370.1502025, 297.314415),
44+
(383.99038, 290.42349),
45+
(425.3782575, 261.03182375),
46+
(455.62553, 237.51598),
47+
(457.673981406, 232.384370781),
48+
(457.63498125, 226.75574125),
49+
(455.656955469, 221.435746094),
50+
(451.88833, 217.23004),
51+
(411.03035375, 203.142875),
52+
(364.28838, 189.00345),
53+
(346.28838, 187.51289),
54+
(334.345396094, 188.212601406),
55+
(324.08682875, 190.43598375),
56+
(314.755874531, 194.422959219),
57+
(305.59573, 200.41345),
58+
(298.69523, 205.64576),
59+
(302.36566, 200.82194),
60+
(309.1910175, 190.60812125),
61+
(313.73687, 180.22634),
62+
(316.80698125, 162.25769875),
63+
(315.61122, 142.49811),
64+
(302.2062, 97.30761225),
65+
(287.72529, 54.616095),
66+
(281.9467975, 48.27558525),
67+
(273.17468, 46.774785),
68+
(268.19440125, 47.74447575),
69+
(264.37486, 50.652804),
70+
(236.2211725, 88.324987),
71+
(209.53225, 127.99811),
72+
(202.6606625, 146.3071125),
73+
(201.25938, 164.93584),
74+
(203.77534, 181.49811),
75+
(206.51089, 188.99811),
76+
(205.9051675, 188.794985),
77+
(203.43769, 185.49811),
78+
(196.64267375, 177.104034375),
79+
(188.75523, 169.97381),
80+
(179.92702375, 164.224298125),
81+
(170.30972, 159.97236),
82+
(160.326935313, 157.051098125),
83+
(148.6087275, 155.3990125),
84+
(102.61522, 154.49966),
85+
(60.16592325, 155.3425225),
86+
(53.6551856875, 157.376749063),
87+
(50.290496, 161.35986),
88+
(47.372345, 168.60014),
89+
(48.89669, 175.71523),
90+
(74.532052, 211.99811),
91+
(94.1360167813, 237.819985),
92+
(108.59780025, 254.2254825),
93+
(120.832361594, 264.08215625),
94+
(133.75466, 270.25756),
95+
(141.60613, 272.36428),
96+
(152.49621, 273.38038),
97+
(164.49621, 273.99811),
98+
(158.0089, 275.81829),
99+
(145.07552625, 280.9514125),
100+
(133.8165275, 288.7022225),
101+
(124.0311775, 299.24521125),
102+
(115.51875, 312.75487),
103+
(98.843153625, 358.473565),
104+
(85.295136, 403.16722),
105+
(85.26685925, 408.01758375),
106+
(86.915068, 411.86681),
107+
(92.4915405, 417.39844125),
108+
(99.473822, 419.49811),
109+
(143.00896275, 406.315715),
110+
(190.36777, 389.38911),
111+
(202.01838, 382.636295),
112+
(212.26301, 373.79104),
113+
(221.50430875, 362.505715),
114+
(227.61924, 348.61117),
115+
(230.74226, 339.12239),
116+
(231.21585, 351.56025),
117+
(232.0963625, 362.919155),
118+
(234.30307, 370.76155),
119+
(242.12680375, 385.41184875),
120+
(253.38592, 399.00254),
121+
(289.43734875, 427.02384125),
122+
(327.49622, 454.1789),
123+
(334.9740875, 456.36105375),
124+
#(342.49622, 454.2166),
125+
#(342.49622, 454.21659),
126+
],
127+
# Group 3
128+
[(269.38148, 328.24811),
129+
(260.235962344, 318.54971125),
130+
(252.98225875, 304.9253925),
131+
(249.221025781, 291.33056),
132+
(249.150290957, 285.780265547),
133+
(250.55292, 281.72062),
134+
(254.134922402, 279.408903848),
135+
(258.744026719, 280.396155156),
136+
(263.916454863, 284.085617324),
137+
(269.18842875, 289.88053375),
138+
(278.175901406, 305.399702969),
139+
(280.963844004, 313.930442559),
140+
(281.99622, 322.17961),
141+
(281.55819875, 326.77132),
142+
(279.99622, 329.49811),
143+
(275.74986, 331.3257375),
144+
#(269.38148, 328.24811),
145+
#(269.38148, 328.24811),
146+
],
147+
# Group 4
148+
[(189.27613, 317.48919),
149+
(186.689292012, 315.017226172),
150+
(186.253231719, 310.95217),
151+
(190.75285125, 299.8028675),
152+
(200.613802656, 287.56145625),
153+
(213.6749, 277.74811),
154+
(220.431676309, 274.964493711),
155+
(225.392900469, 274.551332812),
156+
(228.531887832, 276.197175508),
157+
(229.82195375, 279.59057),
158+
(229.236413574, 284.420064492),
159+
(226.748582656, 290.374207187),
160+
(215.95931, 304.41063),
161+
(208.563450625, 310.792326562),
162+
(201.1146375, 315.3621975),
163+
(194.417365625, 317.725924687),
164+
#(189.27613, 317.48919),
165+
#(189.27613, 317.48919),
166+
],
167+
# Group 5
168+
[(270.49622, 263.99178),
169+
(266.275620215, 261.866190078),
170+
(264.014989219, 259.301005),
171+
(263.608503301, 256.443141797),
172+
(264.95033875, 253.4395175),
173+
(272.455678906, 247.58265375),
174+
(285.68442, 242.90575),
175+
(302.642775, 241.59651875),
176+
(316.00365, 244.06329),
177+
(319.7235275, 248.4713),
178+
(318.6949, 253.83523),
179+
(310.640874688, 259.620080625),
180+
(297.3441375, 263.7845675),
181+
(282.673111563, 265.513523125),
182+
#(270.49622, 263.99178),
183+
#(270.49622, 263.99178),
184+
],
185+
# Group 6
186+
[(202.04337, 252.52942),
187+
(191.235123437, 247.592305),
188+
(181.9467875, 241.23868),
189+
(175.444952812, 234.5173375),
190+
(172.99621, 228.47707),
191+
(174.24765832, 224.997173086),
192+
(177.684219687, 223.036961563),
193+
(189.20598, 223.281585),
194+
(203.748087812, 228.422920938),
195+
(217.49714, 237.67295),
196+
(224.516762344, 246.891496563),
197+
(224.975280254, 250.442414727),
198+
(223.57588375, 253.118295),
199+
(220.450783652, 254.792036523),
200+
(215.732190781, 255.336538437),
201+
#(202.04337, 252.52942),
202+
#(202.04337, 252.52942),
203+
],
204+
# Group 7
205+
[(243.14004, 239.17141),
206+
(240.444360469, 233.682861094),
207+
(238.94700375, 225.78207875),
208+
(239.96685, 206.99811),
209+
(245.63492375, 191.82701),
210+
(249.349385156, 186.715313438),
211+
(252.99622, 184.38871),
212+
(256.799735, 184.899581563),
213+
(259.7174025, 187.9743),
214+
(262.71503, 201.49811),
215+
(261.901079688, 215.476273438),
216+
(258.45465, 228.0064775),
217+
(253.205227813, 237.032497812),
218+
(250.16360918, 239.588868945),
219+
(246.9823, 240.49811),
220+
#(243.14004, 239.17141),
221+
#(243.14004, 239.17141),
222+
]
223+
]

0 commit comments

Comments
 (0)