-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbolt5.js
262 lines (195 loc) · 3.41 KB
/
bolt5.js
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
// check out this guide to learn how to program in blot
// https://blot.hackclub.com/editor?guide=start
// store final lines here
const width = 178;
const height = 178;
setDocDimensions(width, height);
const beakLength = 10
const beakW = 2.8
const finalLines = [];
const bottomEdge = [
bt.nurbs([
[-2, -1],
[beakLength * 0.1, beakW],
[beakLength * 0.8, beakW * 0.85],
[beakLength, 2]
])
]
bt.translate(bottomEdge, [44.5, 88]);
const topEdge = [
bt.nurbs([
[-3, -1],
[beakLength * 0.5, 4],
[beakLength * 1.6, beakW * -1.89],
[beakLength, 0]
])
]
bt.translate(topEdge, [43, 94]);
bt.rotate(topEdge, 46);
const beak = bt.join(topEdge, bottomEdge);
bt.rotate(beak, 59);
bt.translate(beak,[19,50]);
bt.scale(beak,[1.2,1.1]);
// draw it
drawLines(beak);
const joint = [
bt.nurbs([
[-3, 4],
[6, 1],
[4, -2]
])
]
bt.translate(joint, [70, 148]);
bt.rotate(joint, 6);
drawLines(joint);
//BEAK DONE
//MOUTH
const mouthLine = [
bt.nurbs([
[29, 1],
[23, -2],
[19, -1]
])
]
bt.translate(mouthLine,[50.0,138]);
bt.rotate(mouthLine, -25);
drawLines(mouthLine);
const highBeak = bt.join(topEdge,bottomEdge,mouthLine)
drawLines(highBeak);
//curve at the mouth
const mouthCurve = [
bt.nurbs([
[-3, -97],
[-7, -90],
[1, -87]
])
]
bt.translate(mouthCurve,[79.1,234]);
bt.rotate(mouthCurve, -129);
drawLines(mouthCurve);
// done mouth
// head
const headL = [
bt.nurbs([
[-1, -98],
[-1, -89],
[1, -92]
])
]
bt.translate(headL,[67.6,248]);
bt.rotate(headL, -6);
drawLines(headL);
const head2 = [
bt.nurbs([
[-3, -93],
[-1, -96],
[1, -92]
])
]
bt.translate(head2,[71.7,251]);
bt.rotate(head2, 202);
drawLines(head2);
const head = [
bt.nurbs([
[-15, -91],
[6, -91],
[2, -88]
])
]
bt.translate(head,[87.5,248]);
bt.rotate(head, 171);
drawLines(head);
const head3= [
bt.nurbs([
[-15, -91],
[-4, -91],
[2, -88]
])
]
bt.translate(head3,[103.7,244]);
bt.rotate(head3, 140);
drawLines(head3);
const head4= [
bt.nurbs([
[-28, -91],
[-4, -91],
[2, -88]
])
]
bt.translate(head4,[121.0,226]);
bt.rotate(head4, 102);
drawLines(head4);
const head5= [
bt.nurbs([
[-7, -91],
[-4, -91],
[2, -88]
])
]
bt.translate(head5,[81.9,221]);
bt.rotate(head5, 70);
drawLines(head5);
const wing1 =[
bt.nurbs([
[-49, -70],
[-7, -67],
[2, -88]
])
]
bt.translate(wing1,[103.8,174]);
bt.rotate(wing1, 117);
drawLines(wing1);
const wing2= [
bt.nurbs([
[-41, -128],
[25, -105],
[2, -88]
])
]
bt.translate(wing2,[126.9,204]);
bt.rotate(wing2, 63);
drawLines(wing2);
const wing3= [
bt.nurbs([
[-31, -136],
[-38, -109],
[2, -88]
])
]
bt.translate(wing3,[124.4,205]);
bt.rotate(wing3, 409);
drawLines(wing3);
const wing4= [
bt.nurbs([
[-31, -136],
[-7, -87],
[3, -88]
])
]
bt.translate(wing4,[96.0,210]);
bt.rotate(wing4, 400);
drawLines(wing4);
//const bodyAll = bt.join(bottomEdge,topEdge,mouthLine,mouthCurve, headL,head2, head, head3,head4,head5,wing1,wing2,wing3,wing4);
//bt.translate(bodyAll, [31,7]);
//drawLines(bodyAll);
//DONE WINGS
const toes1= [
bt.nurbs([
[19, -97],
[7, -98],
[3, -88]
])
]
bt.translate(toes1,[71.9,152]);
bt.rotate(toes1, 607);
drawLines(toes1);
const toes2= [
bt.nurbs([
[19, -97],
[9, -99],
[3, -88]
])
]
bt.translate(toes2,[75.5,149]);
bt.rotate(toes2, 612);
drawLines(toes2);