• Remix
  • Share
  • New Entry

on 10 Nov 2023
  • 11
  • 82
  • 0
  • 2
  • 1496
drawframe(1);
Write your drawframe function below
function drawframe(f)
if any(f==1:4:48)
hold off
yy = [198 189];
xx = [388 554];
% I took these coordinates using 'drawpolygon' eheh :)
bocca =[411 370
438 383
466 386
497 382
504 382
525 366
482 362
469 366
448 363];
nose=[420 313
443 296
513 306
460 316];
eyeL = [345 198
368 193
372 207
390 207
402 202
400 193
404 188
420 187
389 176
346 187];
neck=[383 437
383 586
633 558
609 408];
eyebL=[325 163
357 153
401 148
427 143
417 126
379 121
348 134];
eyebR=[503 149
519 114
574 118
594 126
627 158
601 148
572 140
533 144];
nero=[109 832
99 730
152 592
318 525
363 515
553 486
674 500
733 539
770 595
805 605
850 840
820 837
784 837];
caps=[228 72
255 79
280 29
291 13
680 4
695 44
699 128
677 174
656 249
653 112
587 121
619 97
517 109
582 66
487 92
541 35
436 118
400 118
468 69
360 109
302 144
302 246
272 157
264 170
248 143
252 112];
rosso=[377 474
336 658
404 595
449 699
654 574
672 535
627 437
621 486
416 592];
rosa=[295 222
280 204
278 253
297 333
323 357
331 392
368 458
442 495
522 484
599 443
636 370
649 316
679 280
690 202
685 183
657 200
661 97
628 18
317 20
290 108];
marr = [.3 .2 .14];
dra( nero,'k');
dra( neck,[1 .90 .90]);
dra( rosso,[.63 .07 .18]);
dra( rosa,[1 .94 .94]);
dra( bocca,[.81 .67 .61]);
dra( nose,[.95 .9 .9]);
dra( caps,marr);
dra( eyebL,marr);
dra( eyebR,marr);
for i=1:2
for j=1:100
drawc([xx(i)+rand*5 -(yy(i)+rand*5)])
end
end
axis equal
axis off
set(gcf,'color',[255,255,224]/255)
end
end
function dra(a,c)
fill(a(:,1),-a(:,2),c,'EdgeCol','none'); hold on
end
function drawc(c)
r = 10+rand*6;
aa = 2*pi*linspace(0,1,randi([4 8]));
fill( sin(aa)*r+c(1)+randn*5, randn*5+cos(aa)*r+c(2), hsv2rgb([rand .5 1]),...
'FaceAlpha',.5,'EdgeColor','none');
end
Animation
Remix Tree