;;; Scheme Recursive Art Contest Entry ;;; ;;; Please do not include your name or personal info in this file. ;;; ;;; Title: DinoDog goes (W)oof ;;; ;;; Description: ;;; ; execute actions in scheme list once, then repeat count times (define (repeat-x-more actions count) (do-action actions) (if (= count 0) (pendown) (repeat-x-more actions (- count 1)) ) ) (define (do-action actions) (eval (car actions)) (if (null? (cdr actions)) (pendown) (do-action (cdr actions)) ) ) (define (draw-circle circ degrees heading turn) (setheading heading) (define (draw-helper circ degrees-left) (forward (/ circ 360)) (turn 1) (cond ((= degrees-left 1) (pendown)) (else (draw-helper circ (- degrees-left 1)) ) ) ) (draw-helper circ degrees) ) (define (spike start_x start_y peak_x peak_y end_x end_y fill) (setposition (- start_x 500) (- 500 start_y)) (pendown) (if fill (begin (begin_fill) (setposition (- peak_x 500) (- 500 peak_y)) (setposition (- end_x 500) (- 500 end_y)) (setposition (- start_x 500) (- 500 start_y)) (end_fill) (penup) ) (begin (setposition (- peak_x 500) (- 500 peak_y)) (setposition (- end_x 500) (- 500 end_y)) (setposition (- start_x 500) (- 500 start_y)) (penup) ) ) ) (define (coordinate-adjust lst) (if (null? lst) nil (begin (define x (- (car lst) 500)) (define y (- 500 (car (cdr lst)))) (cons x (cons y (coordinate-adjust (cdr (cdr lst))))) ) ) ) (define (coordinate-execute lst) (setposition (car lst) (car (cdr lst))) (begin_fill) (define (coordinate-helper lst) (setposition (car lst) (car (cdr lst))) (if (null? (cdr (cdr lst))) (begin (end_fill) (penup) ) (begin (pendown) (coordinate-helper (cdr (cdr lst))) ) ) ) (coordinate-helper (cdr (cdr lst))) ) (define (dino-body) (setposition (- 60) 140) (pendown) (color (rgb .2 .8 .2)) (begin_fill) (draw-circle 850 90 20 right) (draw-circle 850 50 110 right) (repeat-x-more '((right 1) (forward 45)) 8) (draw-circle 650 60 165 left) (forward 75) (draw-circle 75 90 180 right) (forward 550) ; legs (draw-circle 150 90 270 right) (draw-circle 50 90 0 right) (repeat-x-more '((left 2) (forward 15)) 5) (draw-circle 200 30 80 left) (repeat-x-more '((left 2) (forward 10)) 5) (draw-circle 200 60 40 left) (forward 190) (draw-circle 50 20 340 right) (draw-circle 50 90 0 right) (draw-circle 500 90 90 left) (draw-circle 600 90 0 left) (forward 2) (end_fill) (penup) (setposition (- 60) 140) (pendown) (color "#000000") (draw-circle 850 90 20 right) (draw-circle 850 50 110 right) (repeat-x-more '((right 1) (forward 45)) 8) (draw-circle 650 60 165 left) (forward 75) (draw-circle 75 90 180 right) (forward 550) ; legs (draw-circle 150 90 270 right) (draw-circle 50 90 0 right) (repeat-x-more '((left 2) (forward 15)) 5) (draw-circle 200 30 80 left) (repeat-x-more '((left 2) (forward 10)) 5) (draw-circle 200 60 40 left) (forward 190) (draw-circle 50 20 340 right) (draw-circle 50 90 0 right) (draw-circle 500 90 90 left) (draw-circle 600 90 0 left) (forward 2) (setposition (- 60) 140) (penup) ) (define (dino-paws) (setposition (- 100) (- 315)) (pendown) (color (rgb .2 .8 .2)) (begin_fill) (setheading 350) (forward 40) (draw-circle 250 90 350 left) (draw-circle 90 90 260 left) (repeat-x-more '((left 2) (forward 14)) 5) (setheading 90) (forward 45) (end_fill) (penup) (setposition (- 100) (- 315)) (pendown) (color "#000000") (setheading 350) (forward 40) (draw-circle 250 90 350 left) (draw-circle 90 90 260 left) (repeat-x-more '((left 2) (forward 14)) 5) (penup) (setposition (- 100) (- 315)) (pendown) (setheading 170) (forward 5) (penup) ) (define (dino-markz) (setposition 21 155) (color "#f12e45") (pendown) (begin_fill) (circle 15) (end_fill) (penup) (setposition 17 168) (color "#ffe400") (pendown) (begin_fill) (circle 4) (end_fill) (penup) (color "#fc933c") (coordinate-execute (coordinate-adjust '(567 718 634 615 625 584 603 584 603 559 644 559 699 695 721 688 729 711 680 727 648 647 599 718))) ) (define (stubby-arms) (setposition (- 35) (- 91)) (color (rgb .2 .8 .2)) (setheading 265) (pendown) (begin_fill) (forward 120) (draw-circle 100 90 265 left) (draw-circle 100 90 175 left) (draw-circle 100 90 175 left) (forward 150) (end_fill) (penup) (setposition (- 156) (- 101)) (color "#ddb68f") (pendown) (begin_fill) (draw-circle 100 90 265 left) (draw-circle 100 90 175 left) (draw-circle 105 90 175 left) (left 90) (forward 18) (left 90) (forward 18) (setposition (- 156) (- 101)) (end_fill) (penup) (setposition (- 35) (- 92)) (color "#000000") (setheading 265) (forward 121) (draw-circle 100 90 265 left) (penup) (draw-circle 100 90 175 left) (penup) (draw-circle 100 90 175 left) (forward 120) (penup) (setposition (- 33) (- 91)) (setheading 265.5) (pendown) (forward 122) (penup) (setposition (- 156) (- 101)) (pendown) (draw-circle 100 90 265 left) (draw-circle 100 90 175 left) (draw-circle 105 90 175 left) (penup) ) (define (doggy-head) (setposition (- 45) 143) (pendown) (color "#ddb68f") (begin_fill) (draw-circle 550 50 235 left) (draw-circle 300 70 185 right) (draw-circle 175 75 255 left) (forward 15) (draw-circle 75 90 180 left) (setheading 85) (forward 20) (draw-circle 25 90 90 right) (draw-circle 150 90 180 left) (setheading 88) (forward 145) (setheading 0) (forward 175) (left 90) (forward 93) (end_fill) (penup) ) (define (tongue-line offset) (color "#9e7e67") (setheading 80) (setposition (- 127) (- offset 20)) (pendown) (forward 65) (if (= offset 0) (penup) (tongue-line (- offset 1)) ) ) (define (doggy-tongue) (setposition (- 100) (- 15)) (pendown) (color "#f44e52") (begin_fill) (setheading 183) (forward 25) (draw-circle 70 90 183 right) (forward 5) (draw-circle 70 90 273 right) (forward 25) (end_fill) (penup) ) (define (doggo-markz) ; nose (setposition (- 137) 15) (pendown) (color (rgb 0 0 0)) (begin_fill) (draw-circle 135 90 0 right) (draw-circle 135 90 90 right) (draw-circle 40 90 180 right) (forward 30.5) (draw-circle 40 90 270 right) (end_fill) (penup) ; eye (setposition (- 58) 90) (pendown) (begin_fill) (draw-circle 75 90 0 right) (draw-circle 75 90 90 right) (forward 10) (draw-circle 75 90 180 right) (draw-circle 75 90 270 right) (forward 10) (end_fill) (penup) (setposition (- 46) 89) (pendown) (color (rgb 1 1 1)) (begin_fill) (circle 4) (end_fill) (penup) ; tear (color "#2bf7f9") (setposition (- 47) 58) (setheading 200) (pendown) (begin_fill) (forward 20) (draw-circle 50 90 180 left) (draw-circle 50 90 90 left) (setheading 340) (forward 20) (end_fill) (penup) ) (define (draw-spikes) (color "#ffe400") (spike 477 306 473 264 513 282 #t) (spike 542 273 562 235 585 273 #t) (spike 614 279 650 257 651 301 #t) (spike 670 319 712 319 690 357 #t) (spike 704 386 746 394 718 428 #t) (spike 726 460 767 468 739 500 #t) (spike 748 532 788 542 759 574 #t) (spike 768 610 808 624 776 653 #t) (spike 784 688 826 701 793 730 #t) (spike 802 763 844 761 825 799 #t) (spike 859 821 888 790 901 834 #t) (color "#ffffff") (spike 458 364 464 383 476 369 #t) (spike 496 379 494 396 510 390 #t) (spike 524 406 515 421 533 422 #t) (spike 538 440 524 450 539 457 #t) (spike 538 479 520 482 531 496 #t) (spike 522 512 505 507 509 524 #t) (spike 488 533 474 522 476 539 #t) (color "#000000") (spike 477 306 473 264 513 282 #f) (spike 542 273 562 235 585 273 #f) (spike 614 279 650 257 651 301 #f) (spike 670 319 712 319 690 357 #f) (spike 704 386 746 394 718 428 #f) (spike 726 460 767 468 739 500 #f) (spike 748 532 788 542 759 574 #f) (spike 768 610 808 624 776 653 #f) (spike 784 688 826 701 793 730 #f) (spike 802 763 844 761 825 799 #f) (spike 859 821 888 790 901 834 #f) ) (define (flag-cycle-left) (draw-circle 25 90 165 right) (forward 10) (draw-circle 25 90 255 right) (draw-circle 25 90 345 left) (forward 10) (draw-circle 25 90 255 left) ) (define (flag-cycle-right) (draw-circle 25 90 345 right) (forward 10) (draw-circle 25 90 75 right) (draw-circle 25 90 165 left) (forward 10) (draw-circle 25 90 75 left) ) (define (sign-outline) (setposition (- 125) (- 150)) (setheading 255) (pendown) (color "#9d6f59") (begin_fill) (forward 20) (right 90) (forward 130) (right 90) (forward 20) (setposition (- 125) (- 150)) (end_fill) (penup) (setposition (- 159) (- 24)) (pendown) (color "#4ba6d1") (begin_fill) (repeat-x-more '((flag-cycle-left)) 6) (draw-circle 25 90 165 right) (forward 10) (draw-circle 25 90 255 right) (forward 175) (repeat-x-more '((flag-cycle-right)) 6) (draw-circle 25 90 345 right) (forward 10) (draw-circle 25 90 75 right) (forward 175) (end_fill) (penup) (setposition (- 159) (- 24)) (pendown) (color (rgb 0 0 1)) (repeat-x-more '((flag-cycle-left)) 6) (draw-circle 25 90 165 right) (forward 10) (draw-circle 25 90 255 right) (forward 175) (repeat-x-more '((flag-cycle-right)) 6) (draw-circle 25 90 345 right) (forward 10) (draw-circle 25 90 75 right) (forward 175) (penup) ) (define (i-failed) (color "#ffffff") (coordinate-execute (coordinate-adjust '(100 487 89 441 101 438 113 483))) (coordinate-execute (coordinate-adjust '(128 479 116 433 137 428 139 437 131 439 133 447 140 446 142 454 135 456 141 476))) (coordinate-execute (coordinate-adjust '(147 474 142 427 158 423 177 467 165 470 162 462 158 462 159 471))) (coordinate-execute (coordinate-adjust '(179 466 167 420 179 417 191 463))) (coordinate-execute (coordinate-adjust '(196 461 184 416 196 413 206 449 213 448 214 456))) (coordinate-execute (coordinate-adjust '(218 456 206 410 226 405 229 414 221 416 223 424 230 423 232 431 225 433 228 443 237 442 239 450))) (coordinate-execute (coordinate-adjust '(242 448 229 403 248 399 254 399 258 401 259 403 268 434 267 439 264 442))) (color "#4ba6d1") (coordinate-execute (coordinate-adjust '(156 455 154 437 160 454))) (coordinate-execute (coordinate-adjust '(252 437 244 408 248 408 255 435))) (penup) ) (define (cs-61a) (color "#ffffff") (coordinate-execute (coordinate-adjust '(117 548 109 516 113 509 121 505 129 505 132 506 136 510 140 522 128 526 125 514 123 513 121 514 129 544 130 545 132 544 130 533 143 530 145 544 141 549 137 552 132 553 122 553 120 552))) (coordinate-execute (coordinate-adjust '(146 533 149 542 154 545 166 545 171 542 175 539 174 529 172 524 165 517 160 515 155 513 152 511 151 507 153 505 156 507 157 511 167 509 166 503 164 500 161 498 150 498 146 500 144 501 141 504 141 515 145 521 151 524 156 526 161 529 163 532 163 536 161 538 159 537 157 529))) (coordinate-execute (coordinate-adjust '(190 528 183 502 183 494 186 490 194 486 202 486 207 488 209 492 209 497 199 498 198 496 195 493 193 494 196 506 198 503 202 502 209 502 213 507 216 520 216 527 211 532 207 534 196 534))) (coordinate-execute (coordinate-adjust '(211 491 218 486 223 480 228 479 240 524 228 527 220 495 212 495))) (coordinate-execute (coordinate-adjust '(242 523 237 476 253 472 272 515 260 518 257 511 253 512 254 520))) (coordinate-execute (coordinate-adjust '(275 515 273 506 280 504 283 512))) (coordinate-execute (coordinate-adjust '(286 511 284 503 292 501 293 509))) (coordinate-execute (coordinate-adjust '(297 508 295 500 302 498 304 506))) (color "#4ba6d1") (coordinate-execute (coordinate-adjust '(202 527 198 514 198 510 201 510 205 524 205 527))) (coordinate-execute (coordinate-adjust '(250 503 249 487 254 503))) ) (define (woof) (color "#1a7bcd") (coordinate-execute (coordinate-adjust '(301 163 301 87 305 81 312 78 330 78 330 89 324 89 322 92 322 158 324 161 330 161 330 172 312 172 306 170))) (coordinate-execute (coordinate-adjust '(344 172 334 78 356 78 362 142 370 78 393 78 400 142 407 78 430 78 418 172 390 172 381 122 373 172))) (coordinate-execute (coordinate-adjust '(433 172 433 161 439 161 442 158 442 93 439 89 433 89 433 78 452 78 459 81 462 85 462 165 459 169 452 172))) (color "#0c00ff") (coordinate-execute (coordinate-adjust '(495 158 495 92 503 81 514 76 532 76 545 84 550 94 550 156 545 166 540 170 531 174 515 174 503 169))) (coordinate-execute (coordinate-adjust '(560 158 560 92 567 81 579 76 596 76 610 84 615 94 615 156 611 166 605 170 596 174 579 174 568 169))) (coordinate-execute (coordinate-adjust '(626 172 626 78 667 78 667 96 650 96 650 115 665 115 665 133 650 133 650 172))) (coordinate-execute (coordinate-adjust '(677 149 674 78 698 78 695 149))) (coordinate-execute (coordinate-adjust '(676 172 676 155 696 155 696 172))) (coordinate-execute (coordinate-adjust '(495 191 495 183 665 183 665 191))) (color "#77dbe0") (coordinate-execute (coordinate-adjust '(518 156 518 94 522 91 527 94 527 155 524 159 520 159))) (coordinate-execute (coordinate-adjust '(583 156 583 94 587 91 592 94 592 155 589 159 585 159))) ) (define (floor) (setposition (- 500) (- 330)) (color "#c5a57b") (pendown) (begin_fill) (setposition 500 (- 330)) (setposition 500 (- 500)) (setposition (- 500) (- 500)) (end_fill) (penup) ) ; Poorly-created laptop code below. May it rest in peace. ; (define (laptop-line offset heading x y) ; (setheading heading) ; (setposition (- offset x) (- y)) ; (pendown) ; (forward 100) ; (if (= offset 0) ; (penup) ; (laptop-line (- offset 1) heading x y) ; ) ; ) ; (define (laptop) ; (setposition (- 420) (- 340)) ; (color "#808080") ; (pendown) ; (begin_fill) ; (setheading 90) ; (forward 120) ; (draw-circle 75 90 90 left) ; (draw-circle 75 90 0 left) ; (forward 150) ; (draw-circle 150 90 180 left) ; (end_fill) ; ; (setposition (- 450) (- 320)) ; (setheading 0) ; (begin_fill) ; (forward 120) ; (draw-circle 75 90 0 right) ; (draw-circle 75 90 90 right) ; (forward 120) ; (end_fill) ; (penup) ; ; (color "#f2f421") ; (laptop-line 3 10 392 247) ; (laptop-line 4 40 354 254) ; (laptop-line 3 75 324 278) ; (laptop-line 3 75 324 277) ; (laptop-line 3 75 324 276) ; ) ; (define (rip-lmao) ; (color "#e92f2f") ; (coordinate-execute (coordinate-adjust '(92 803 92 770 101 770 114 788 114 770 123 ; 770 123 803 114 803 102 785 102 803))) ; (coordinate-execute (coordinate-adjust '(132 803 132 770 154 770 159 774 159 785 154 ; 790 141 790 141 803))) ; ; (color "#77dbe0") ; (coordinate-execute (coordinate-adjust '(142 784 142 777 147 777 149 779 149 782 147 784))) ; ) (define (draw) ; YOUR CODE HERE (penup) (bgcolor "#77dbe0") (woof) (floor) ;(laptop) ;(rip-lmao) (sign-outline) (i-failed) (cs-61a) (doggy-tongue) (doggy-head) (doggo-markz) (tongue-line 2) (draw-spikes) (dino-body) (dino-paws) (stubby-arms) (dino-markz) (hideturtle) (exitonclick)) ; Please leave this last line alone. You may add additional procedures above ; this line. (draw)