-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblot7.js
418 lines (317 loc) · 5.17 KB
/
blot7.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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
// 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([
[22, -97],
[7, -98],
[3, -88]
])
]
bt.translate(toes1,[69.9,152]);
bt.rotate(toes1, 597);
drawLines(toes1);
const toes2= [
bt.nurbs([
[10, -77],
[10, -86],
[3, -88]
])
]
bt.translate(toes2,[81.0,140]);
bt.rotate(toes2, 519);
drawLines(toes2);
const toes3= [
bt.nurbs([
[5, -84.7],
[5, -91],
[3, -88]
])
]
bt.translate(toes3,[87.0,150]);
bt.rotate(toes3, 395);
drawLines(toes3);
const toes4= [
bt.nurbs([
[4, -85.5],
[7, -87],
[3, -88]
])
]
bt.translate(toes4,[76.9,141]);
bt.rotate(toes4, 268);
drawLines(toes4);
const toes5= [
bt.nurbs([
[5, -82.1],
[12, -93],
[3, -88]
])
]
bt.translate(toes5,[71.2,139]);
bt.rotate(toes5, 279);
drawLines(toes5);
const nail = [
([
[0, 0],
[0, 0],
[-1, 3]
])
]
bt.translate(nail,[74.5,47]);
bt.rotate(nail, 354);
drawLines(nail);
const nail2 = [
([
[0, 0],
[0, 0],
[-1, 3]
])
]
bt.translate(nail2,[75.8,47]);
bt.rotate(nail2, 354);
drawLines(nail2);
const nail3 = [
([
[0, 4],
[1, 0],
[-1, 3]
])
]
bt.translate(nail3,[76.3,44]);
bt.rotate(nail3, 397);
drawLines(nail3);
const nail4 = [
([
[0, 0],
[0, 0],
[-1, 3]
])
]
bt.translate(nail4,[81.3,51]);
bt.rotate(nail4, 354);
drawLines(nail4);
const nail5 = [
([
[0, 0],
[0, 0],
[-1, 3]
])
]
bt.translate(nail5,[82.7,51]);
bt.rotate(nail5, 354);
drawLines(nail5);
const nail6 = [
([
[0, 1],
[1, 0],
[-1, 0]
])
]
bt.translate(nail6,[82.5,50]);
bt.rotate(nail6, 368);
drawLines(nail6);
// toe nails done
//other foot
const foot = [
bt.nurbs ([
[-16, 27],
[7, 14],
[-1, 0]
])
]
bt.translate(foot,[111.6,38]);
bt.rotate(foot, 444);
drawLines(foot);
const foot2 = [
bt.nurbs ([
[-13, 25],
[5, 10],
[-1, 0]
])
]
bt.translate(foot2,[112.6,37]);
bt.rotate(foot2, 446);
drawLines(foot2);
const foot3 = [
bt.nurbs ([
[6, 4],
[5, 10],
[-1, 0]
])
]
bt.translate(foot3,[89.8,41]);
bt.rotate(foot3, 523);
drawLines(foot3);