diff --git a/#project.rkt#2# b/#project.rkt#2# new file mode 100644 index 0000000..c3f6219 --- /dev/null +++ b/#project.rkt#2# @@ -0,0 +1,8004 @@ +#reader(lib"read.ss""wxme")WXME0108 ## +#| + This file uses the GRacket editor format. + Open this file in DrRacket version 6.1 or later to read it. + + Most likely, it was created by saving a program in DrRacket, + and it probably contains a program with non-text elements + (such as images or comment boxes). + + http://racket-lang.org/ +|# + 31 7 #"wxtext\0" +3 1 6 #"wxtab\0" +1 1 8 #"wximage\0" +2 0 8 #"wxmedia\0" +4 1 34 #"(lib \"syntax-browser.ss\" \"mrlib\")\0" +1 0 16 #"drscheme:number\0" +3 0 44 #"(lib \"number-snip.ss\" \"drscheme\" \"private\")\0" +1 0 36 #"(lib \"comment-snip.ss\" \"framework\")\0" +1 0 93 +( + #"((lib \"collapsed-snipclass.ss\" \"framework\") (lib \"collapsed-sni" + #"pclass-wxme.ss\" \"framework\"))\0" +) 0 0 43 #"(lib \"collapsed-snipclass.ss\" \"framework\")\0" +0 0 19 #"drscheme:sexp-snip\0" +0 0 36 #"(lib \"cache-image-snip.ss\" \"mrlib\")\0" +1 0 68 +( + #"((lib \"image-core.ss\" \"mrlib\") (lib \"image-core-wxme.rkt\" \"mr" + #"lib\"))\0" +) 1 0 29 #"drscheme:bindings-snipclass%\0" +1 0 88 +( + #"((lib \"pict-snip.rkt\" \"drracket\" \"private\") (lib \"pict-snip.r" + #"kt\" \"drracket\" \"private\"))\0" +) 0 0 34 #"(lib \"bullet-snip.rkt\" \"browser\")\0" +0 0 25 #"(lib \"matrix.ss\" \"htdp\")\0" +1 0 22 #"drscheme:lambda-snip%\0" +1 0 29 #"drclickable-string-snipclass\0" +0 0 26 #"drracket:spacer-snipclass\0" +0 0 57 +#"(lib \"hrule-snip.rkt\" \"macro-debugger\" \"syntax-browser\")\0" +1 0 26 #"drscheme:pict-value-snip%\0" +0 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0" +1 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0" +2 0 55 #"(lib \"vertical-separator-snip.ss\" \"stepper\" \"private\")\0" +1 0 18 #"drscheme:xml-snip\0" +1 0 31 #"(lib \"xml-snipclass.ss\" \"xml\")\0" +1 0 21 #"drscheme:scheme-snip\0" +2 0 34 #"(lib \"scheme-snipclass.ss\" \"xml\")\0" +1 0 10 #"text-box%\0" +1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0" +1 0 1 6 #"wxloc\0" + 0 0 55 0 1 #"\0" +0 75 1 #"\0" +0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9 +#"Standard\0" +0 75 10 #"Monospace\0" +0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 2 24 +#"framework:default-color\0" +0 -1 1 #"\0" +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 255 255 255 -1 -1 2 +1 #"\0" +0 -1 1 #"\0" +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 15 +#"text:ports out\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 255 0 0 0 0 0 -1 +-1 2 15 #"text:ports err\0" +0 -1 1 #"\0" +1 0 -1 92 93 -1 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 17 +#"text:ports value\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1 +-1 2 27 #"Matching Parenthesis Style\0" +0 -1 1 #"\0" +1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1 +-1 2 1 #"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 37 +#"framework:syntax-color:scheme:symbol\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 38 +#"framework:syntax-color:scheme:keyword\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2 +38 #"framework:syntax-color:scheme:comment\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 37 +#"framework:syntax-color:scheme:string\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 35 +#"framework:syntax-color:scheme:text\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 39 +#"framework:syntax-color:scheme:constant\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 49 +#"framework:syntax-color:scheme:hash-colon-keyword\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 42 +#"framework:syntax-color:scheme:parenthesis\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36 +#"framework:syntax-color:scheme:error\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 36 +#"framework:syntax-color:scheme:other\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 16 +#"Misspelled Text\0" +0 -1 1 #"\0" +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2 +38 #"drracket:check-syntax:lexically-bound\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 28 +#"drracket:check-syntax:set!d\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 37 +#"drracket:check-syntax:unused-require\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36 +#"drracket:check-syntax:free-variable\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 31 +#"drracket:check-syntax:imported\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 47 +#"drracket:check-syntax:my-obligation-style-pref\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 50 +#"drracket:check-syntax:their-obligation-style-pref\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 48 +#"drracket:check-syntax:unk-obligation-style-pref\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2 +49 #"drracket:check-syntax:both-obligation-style-pref\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2 +26 #"plt:htdp:test-coverage-on\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1 +#"\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 2 27 +#"plt:htdp:test-coverage-off\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 4 1 +#"\0" +0 70 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 +-1 -1 4 4 #"XML\0" +0 70 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 +-1 -1 2 37 #"plt:module-language:test-coverage-on\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 38 +#"plt:module-language:test-coverage-off\0" +0 -1 1 #"\0" +1 0 -1 92 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 4 1 +#"\0" +0 71 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 +-1 -1 4 1 #"\0" +0 -1 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1 +-1 4 1 #"\0" +0 71 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 0 255 0 0 0 -1 +-1 4 1 #"\0" +0 71 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 100 0 0 0 0 -1 +-1 0 14161 0 28 3 12 #"#lang racket" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 7 #"require" +0 0 24 3 1 #" " +0 0 14 3 12 #"gigls/unsafe" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 17 3 33 #";;;TO FIND WHERE OUR PROFESSOR IS" +0 0 24 29 1 #"\n" +0 0 17 3 21 #";;;Game instructions:" +0 0 24 29 1 #"\n" +0 0 17 3 67 +#";;;*Although the game is compatible with various width and height, " +0 0 24 29 1 #"\n" +0 0 17 3 6 #";;; we" +0 0 17 3 1 #" " +0 0 17 3 8 #"strongly" +0 0 17 3 1 #" " +0 0 17 3 7 #"courage" +0 0 17 3 1 #" " +0 0 17 3 3 #"you" +0 0 17 3 1 #" " +0 0 17 3 2 #"to" +0 0 17 3 1 #" " +0 0 17 3 3 #"use" +0 0 17 3 1 #" " +0 0 17 3 4 #"same" +0 0 17 3 1 #" " +0 0 17 3 5 #"width" +0 0 17 3 1 #" " +0 0 17 3 3 #"and" +0 0 17 3 1 #" " +0 0 17 3 6 #"height" +0 0 17 3 1 #" " +0 0 17 3 4 #"from" +0 0 17 3 1 #" " +0 0 17 3 4 #"1000" +0 0 17 3 1 #" " +0 0 24 29 1 #"\n" +0 0 17 3 6 #";;; to" +0 0 17 3 1 #" " +0 0 17 3 4 #"2000" +0 0 17 3 1 #" " +0 0 17 3 2 #"to" +0 0 17 3 1 #" " +0 0 17 3 8 #"generate" +0 0 17 3 1 #" " +0 0 17 3 3 #"the" +0 0 17 3 1 #" " +0 0 17 3 4 #"best" +0 0 17 3 9 #" picture." +0 0 24 29 1 #"\n" +0 0 17 3 38 #";;;1. Start with (game 0 width height)" +0 0 24 29 1 #"\n" +0 0 17 3 29 #";;;2. You will see a magic ci" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 17 #";;;Procedure:game" +0 0 24 29 1 #"\n" +0 0 17 3 51 #";;;Parameter:num, an positive integer between 1~999" +0 0 24 29 1 #"\n" +0 0 17 3 57 #";;; width, a positive number, width of the image" +0 0 24 29 1 #"\n" +0 0 17 3 59 +#";;; height, a positive number, height of the image" +0 0 24 29 1 #"\n" +0 0 17 3 60 +#";;;Purpose: apply the game mechinism to the whole procedure" +0 0 24 29 1 #"\n" +0 0 17 3 20 #";;;Produce: nothing" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 4 #"game" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle1" +0 0 24 3 1 #" " +0 0 21 3 3 #"311" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 2 #"or" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"311" +0 0 24 3 2 #") " +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"324" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"339" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"356" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"375" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"396" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"419" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"444" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"471" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 3 #"275" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"275" +0 0 24 3 3 #")) " +0 0 21 3 1 #"5" +0 0 24 3 6 #"))))) " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"500" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle2" +0 0 24 3 1 #" " +0 0 21 3 2 #"28" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 2 #"or" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 2 #"28" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 2 #"66" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"114" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"172" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"240" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"318" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"406" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"504" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"612" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle2" +0 0 24 3 2 #" (" +0 0 14 3 5 #"round" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 3 #"2.3" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 2 #") " +0 0 21 3 4 #"5.29" +0 0 24 3 3 #")) " +0 0 21 3 3 #"2.3" +0 0 24 3 5 #")))) " +0 0 21 3 4 #"5.29" +0 0 24 3 4 #"))) " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"730" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"841" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"841" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"909" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"909" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"141" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"141" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"756" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"756" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"958" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"958" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"279" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"279" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"656" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"656" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"989" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"989" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"412" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"412" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle3" +0 0 24 3 1 #" " +0 0 21 3 3 #"544" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 13 #" " +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 13 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"544" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle4" +0 0 24 3 1 #" " +0 0 21 3 2 #"17" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 2 #"or" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 2 #"17" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 2 #"53" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"104" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"169" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"247" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"337" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"438" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"549" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"670" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle4" +0 0 24 3 2 #" (" +0 0 14 3 5 #"floor" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 2 #"16" +0 0 24 3 2 #" (" +0 0 14 3 4 #"expt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 4 #"expt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #") " +0 0 21 3 2 #"16" +0 0 24 3 3 #") (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 3 #"1.7" +0 0 24 3 4 #"))) " +0 0 21 3 3 #"1.7" +0 0 24 3 5 #")))) " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"801" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"540" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"540" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"416" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"416" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"979" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"979" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"653" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"653" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"283" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"283" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"960" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"960" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"753" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"753" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"145" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"145" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"911" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"911" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 18 #"draw-magic-circle5" +0 0 24 3 1 #" " +0 0 21 3 3 #"839" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 21 3 3 #"839" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 6 #"source" +0 0 24 3 2 #" (" +0 0 14 3 10 #"image-load" +0 0 24 3 1 #" " +0 0 19 3 42 #"\"/home/chenziwe/Desktop/project/titus.jpg\"" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 6 #"target" +0 0 24 3 2 #" (" +0 0 14 3 9 #"image-new" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 23 #"image-copy-paste-block!" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" " +0 0 14 3 6 #"source" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" " +0 0 14 3 6 #"target" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 10 #"image-show" +0 0 24 3 1 #" " +0 0 14 3 6 #"target" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 10 #" " +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 4 #"else" +0 0 24 3 2 #" (" +0 0 14 3 9 #"draw-tree" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" )" +0 0 24 29 1 #"\n" +0 0 24 3 4 #" " +0 0 24 29 1 #"\n" +0 0 24 3 4 #" " +0 0 24 29 1 #"\n" +0 0 24 3 6 #" ))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 55 #";;;;;;;;;;;;;;;;;;;general procedures;;;;;;;;;;;;;;;;;;" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 22 #";;;Procedure:split-num" +0 0 24 29 1 #"\n" +0 0 17 3 39 #";;;Parameter:num, a three digits number" +0 0 24 29 1 #"\n" +0 0 17 3 38 #";;;Purpose:creat a list of 3 numbers, " +0 0 24 29 1 #"\n" +0 0 17 3 90 +( + #";;; first is the hundreds digit, next is the tens digit, the " + #"last is the unit digit" +) 0 0 24 29 1 #"\n" +0 0 17 3 30 #";;;Produce:splited-num, a list" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"split-num" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 3 #"num" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 14 3 4 #"list" +0 0 24 3 2 #" (" +0 0 14 3 8 #"quotient" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 3 #"100" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" (" +0 0 14 3 9 #"remainder" +0 0 24 3 2 #" (" +0 0 14 3 8 #"quotient" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #") " +0 0 21 3 2 #"10" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" (" +0 0 14 3 9 #"remainder" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 20 #";;;Procedure:draw-bg" +0 0 24 29 1 #"\n" +0 0 17 3 28 #";;;Parameter:image, an image" +0 0 24 29 1 #"\n" +0 0 17 3 40 #";;; color, an rgb encoded color" +0 0 24 29 1 #"\n" +0 0 17 3 79 +( + #";;;Purpose:draw the background of the image, a halo at the center of" + #" the image " +) 0 0 24 29 1 #"\n" +0 0 17 3 56 #";;;Produce:drawed-bg, an image with a halo at its center" +0 0 24 29 1 #"\n" +0 0 17 3 103 +( + #";;; the inner color is the complement of color inputed with e" + #"ach rgb component substracted by 50" +) 0 0 24 29 1 #"\n" +0 0 17 3 89 +( + #";;; the outer color is the color inputed with each rgb compon" + #"ent substracted by 50" +) 0 0 24 29 1 #"\n" +0 0 17 3 135 +( + #";;; the outmost strok is the inputed with each rgb component " + #"substracted by 240(black if all rgb components is smaller than 240)" +) 0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 7 #"draw-bg" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 5 #"color" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 7 #"bgcolor" +0 0 24 3 2 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 5 #"color" +0 0 24 3 2 #") " +0 0 21 3 2 #"50" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 27 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 5 #"color" +0 0 24 3 2 #") " +0 0 21 3 2 #"50" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 27 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 5 #"color" +0 0 24 3 2 #") " +0 0 21 3 2 #"50" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 8 #"bgcolor2" +0 0 24 3 2 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 5 #"color" +0 0 24 3 2 #") " +0 0 21 3 3 #"240" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 5 #"color" +0 0 24 3 2 #") " +0 0 21 3 3 #"240" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 5 #"color" +0 0 24 3 2 #") " +0 0 21 3 3 #"240" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"icolor" +0 0 24 3 2 #" (" +0 0 14 3 15 #"irgb-complement" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 10 #"innercolor" +0 0 24 3 2 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 6 #"icolor" +0 0 24 3 2 #") " +0 0 21 3 2 #"50" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 30 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 6 #"icolor" +0 0 24 3 2 #") " +0 0 21 3 2 #"50" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 30 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 6 #"icolor" +0 0 24 3 2 #") " +0 0 21 3 2 #"50" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 10 #"center-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 1 #"2" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 10 #"center-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 12 #"image-height" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 1 #"2" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"h-axis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 1 #"5" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"v-axis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 2 #"10" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 1 #"a" +0 0 24 3 1 #" " +0 0 14 3 6 #"h-axis" +0 0 24 3 1 #"]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 1 #"b" +0 0 24 3 1 #" " +0 0 14 3 6 #"v-axis" +0 0 24 3 1 #"]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 2 #"r1" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #") (" +0 0 14 3 5 #"floor" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"1.1" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #") (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"1.1" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"1.1" +0 0 24 3 1 #" " +0 0 14 3 1 #"b" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 64 +#" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 67 +#" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 70 +( + #" " + #" (" +) 0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 11 #"))))))))))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 2 #"r2" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #") (" +0 0 14 3 5 #"floor" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #") (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 14 3 1 #"b" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 62 +#" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 65 +#" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 68 +#" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 11 #"))))))))))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 2 #"r3" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #") (" +0 0 14 3 5 #"floor" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.9" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #") (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.9" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.9" +0 0 24 3 1 #" " +0 0 14 3 1 #"b" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 64 +#" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 67 +#" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 70 +( + #" " + #" (" +) 0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 11 #"))))))))))]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" " +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 2 #"bg" +0 0 24 3 2 #" (" +0 0 14 3 13 #"image-compute" +0 0 24 29 1 #"\n" +0 0 24 3 17 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 22 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #">" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 33 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 14 3 1 #"b" +0 0 24 3 5 #")))) " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 27 #" (" +0 0 14 3 2 #"or" +0 0 24 3 2 #" (" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 22 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 8 #"bgcolor2" +0 0 24 3 3 #") (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 6 #")))) (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 5 #")))))" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 8 #"bgcolor2" +0 0 24 3 3 #") (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 6 #")))) (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 5 #")))))" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 8 #"bgcolor2" +0 0 24 3 3 #") (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 6 #")))) (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 7 #"))))))]" +0 0 24 29 1 #"\n" +0 0 24 3 22 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #">" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 6 #"h-axis" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 33 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 6 #"v-axis" +0 0 24 3 4 #"))) " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 27 #" (" +0 0 14 3 2 #"<=" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 14 3 1 #"a" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 14 3 1 #"b" +0 0 24 3 5 #")))) " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 27 #" (" +0 0 14 3 2 #"or" +0 0 24 3 2 #" (" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 22 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 2 #") " +0 0 24 29 1 #"\n" +0 0 24 3 31 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 3 #")) " +0 0 24 29 1 #"\n" +0 0 24 3 49 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 40 #" (" +0 0 14 3 2 #"r1" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 2 #"r2" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #") (" +0 0 14 3 2 #"r1" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 2 #") " +0 0 24 29 1 #"\n" +0 0 24 3 31 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 3 #")) " +0 0 24 29 1 #"\n" +0 0 24 3 49 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 40 #" (" +0 0 14 3 2 #"r1" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 2 #"r2" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #") (" +0 0 14 3 2 #"r1" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 2 #") " +0 0 24 29 1 #"\n" +0 0 24 3 31 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 3 #")) " +0 0 24 29 1 #"\n" +0 0 24 3 49 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 40 #" (" +0 0 14 3 2 #"r1" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 2 #"r2" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #") (" +0 0 14 3 2 #"r1" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 5 #"))))]" +0 0 24 29 1 #"\n" +0 0 24 3 22 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 2 #"<=" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 6 #"h-axis" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 6 #"v-axis" +0 0 24 3 4 #"))) " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 27 #" (" +0 0 14 3 2 #"or" +0 0 24 3 2 #" (" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 22 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 10 #"innercolor" +0 0 24 3 2 #") " +0 0 24 29 1 #"\n" +0 0 24 3 31 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 3 #")) " +0 0 24 29 1 #"\n" +0 0 24 3 46 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 5 #")))) " +0 0 24 29 1 #"\n" +0 0 24 3 37 #" (" +0 0 14 3 2 #"r3" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 3 #") (" +0 0 14 3 8 #"irgb-red" +0 0 24 3 1 #" " +0 0 14 3 10 #"innercolor" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 10 #"innercolor" +0 0 24 3 2 #") " +0 0 24 29 1 #"\n" +0 0 24 3 31 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 3 #")) " +0 0 24 29 1 #"\n" +0 0 24 3 46 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 5 #")))) " +0 0 24 29 1 #"\n" +0 0 24 3 37 #" (" +0 0 14 3 2 #"r3" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 3 #") (" +0 0 14 3 10 #"irgb-green" +0 0 24 3 1 #" " +0 0 14 3 10 #"innercolor" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 28 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 10 #"innercolor" +0 0 24 3 2 #") " +0 0 24 29 1 #"\n" +0 0 24 3 31 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-col" +0 0 24 3 3 #")) " +0 0 24 29 1 #"\n" +0 0 24 3 46 #" (" +0 0 14 3 3 #"sqr" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 1 #" " +0 0 14 3 10 #"center-row" +0 0 24 3 5 #")))) " +0 0 24 29 1 #"\n" +0 0 24 3 37 #" (" +0 0 14 3 2 #"r3" +0 0 24 3 1 #" " +0 0 14 3 1 #"x" +0 0 24 3 1 #" " +0 0 14 3 1 #"y" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 34 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 7 #"bgcolor" +0 0 24 3 3 #") (" +0 0 14 3 9 #"irgb-blue" +0 0 24 3 1 #" " +0 0 14 3 10 #"innercolor" +0 0 24 3 6 #")))))]" +0 0 24 29 1 #"\n" +0 0 24 3 21 #" [" +0 0 14 3 4 #"else" +0 0 24 3 1 #" " +0 0 14 3 10 #"innercolor" +0 0 24 3 3 #"]))" +0 0 24 29 1 #"\n" +0 0 24 3 17 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 3 #") (" +0 0 14 3 12 #"image-height" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 4 #"))])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 23 #"image-copy-paste-block!" +0 0 24 3 1 #" " +0 0 14 3 2 #"bg" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 2 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 3 #") (" +0 0 14 3 12 #"image-height" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 5 #")))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 27 #";;;Procedure:generate-color" +0 0 24 29 1 #"\n" +0 0 17 3 40 #";;;Parameter:num, an integer between 0~9" +0 0 24 29 1 #"\n" +0 0 17 3 83 +( + #";;;Purpose:creat return an rgb encoded color depending on ten condit" + #"ions(input 0~9)" +) 0 0 24 29 1 #"\n" +0 0 17 3 168 +( + #";;; with name of \"" + #"white\" \"lightsalmon\" \"lightblue\" \"gainsboro\" \"lavender\" \"l" + #"emonchiffon\" \"pink\" \"lightcyan\" \"lightblue\" \"paleturquoise\"" + #",respectively " +) 0 0 24 29 1 #"\n" +0 0 17 3 49 #";;;Produce:generated-colors, an rgb encoded color" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 14 #"generate-color" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 3 #"num" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"150" +0 0 24 3 1 #" " +0 0 21 3 3 #"150" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"200" +0 0 24 3 1 #" " +0 0 21 3 3 #"200" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"200" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"200" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"200" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"200" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"192" +0 0 24 3 1 #" " +0 0 21 3 3 #"203" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"200" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"192" +0 0 24 3 1 #" " +0 0 21 3 3 #"203" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"irgb" +0 0 24 3 1 #" " +0 0 21 3 3 #"192" +0 0 24 3 1 #" " +0 0 21 3 3 #"255" +0 0 24 3 1 #" " +0 0 21 3 3 #"203" +0 0 24 3 5 #")])))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 19 #";;;Procedure:25-num" +0 0 24 29 1 #"\n" +0 0 17 3 29 #";;;Parameter:seed, an integer" +0 0 24 29 1 #"\n" +0 0 17 3 53 #";;;Purpose:produce a list of 25 integers between 0~24" +0 0 24 29 1 #"\n" +0 0 17 3 125 +( + #";;; with a given seed the list in final, that is each time we" + #" input the same seed, the random numbers will be the same" +) 0 0 24 29 1 #"\n" +0 0 17 3 26 #";;;Produce:25-nums, a list" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 6 #"25-num" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 4 #"seed" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 14 3 11 #"random-seed" +0 0 24 3 1 #" " +0 0 14 3 4 #"seed" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 3 #"let" +0 0 24 3 1 #" " +0 0 14 3 6 #"kernel" +0 0 24 3 3 #" ([" +0 0 14 3 11 #"list-so-far" +0 0 24 3 1 #" " +0 0 21 3 1 #"'" +0 0 24 3 3 #"()]" +0 0 24 29 1 #"\n" +0 0 24 3 18 #" [" +0 0 14 3 1 #"n" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 2 #"])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 1 #"<" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #") " +0 0 14 3 11 #"list-so-far" +0 0 24 3 1 #"]" +0 0 24 29 1 #"\n" +0 0 24 3 13 #" [" +0 0 14 3 4 #"else" +0 0 24 3 2 #" (" +0 0 14 3 6 #"kernel" +0 0 24 3 2 #" (" +0 0 14 3 4 #"cons" +0 0 24 3 2 #" (" +0 0 14 3 6 #"random" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 2 #") " +0 0 14 3 11 #"list-so-far" +0 0 24 3 3 #") (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 7 #"))]))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 71 +( + #";;;Purpose:define 4 values, each is a list of 25 integers between 0~" + #"24 " +) 0 0 24 29 1 #"\n" +0 0 17 3 93 +( + #";;; these will be used later to determine the position of the" + #" stars in the back ground" +) 0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"star-col1" +0 0 24 3 2 #" (" +0 0 14 3 6 #"25-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"star-row1" +0 0 24 3 2 #" (" +0 0 14 3 6 #"25-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"star-col2" +0 0 24 3 2 #" (" +0 0 14 3 6 #"25-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"star-row2" +0 0 24 3 2 #" (" +0 0 14 3 6 #"25-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 33 #";;;Procedure:draw-central-circles" +0 0 24 29 1 #"\n" +0 0 17 3 28 #";;;Parameter:image, an image" +0 0 24 29 1 #"\n" +0 0 17 3 83 +( + #";;; circle-num, an positive integer(in this case will only " + #"be between 1~9)" +) 0 0 24 29 1 #"\n" +0 0 17 3 36 #";;; left, a positive number" +0 0 24 29 1 #"\n" +0 0 17 3 35 #";;; top, a positive number" +0 0 24 29 1 #"\n" +0 0 17 3 64 +#";;; right, a positive number, must be bigger than left " +0 0 24 29 1 #"\n" +0 0 17 3 63 +#";;; bottom, a positive number, must be bigger than top" +0 0 24 29 1 #"\n" +0 0 17 3 99 +( + #";;;Purpose:draw circle-num circles on the image with left, top, righ" + #"t, bottom edges respectively " +) 0 0 24 29 1 #"\n" +0 0 17 3 65 +#";;;Produce:nothing, but will draw circle-num circles on the image" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 20 #"draw-central-circles" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 10 #"circle-num" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 1 #" " +0 0 14 3 5 #"right" +0 0 24 3 1 #" " +0 0 14 3 6 #"bottom" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 5 #"x-dis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 5 #"right" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 2 #") " +0 0 14 3 10 #"circle-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 5 #"y-dis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 6 #"bottom" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 2 #") " +0 0 14 3 10 #"circle-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 5 #"lefts" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 5 #"x-dis" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 14 3 10 #"circle-num" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"tops" +0 0 24 3 3 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 5 #"y-dis" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 14 3 10 #"circle-num" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"widths" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 5 #"right" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 5 #"x-dis" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 4 #")) (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 14 3 10 #"circle-num" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 7 #"heights" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 6 #"bottom" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 5 #"y-dis" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 4 #")) (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 14 3 10 #"circle-num" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 16 #"draw-one-circle!" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"l" +0 0 24 3 1 #" " +0 0 14 3 1 #"t" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 21 #"image-select-ellipse!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 7 #"REPLACE" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 54 #" " +0 0 14 3 1 #"l" +0 0 24 3 1 #" " +0 0 14 3 1 #"t" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 23 #"image-stroke-selection!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 21 #"image-select-nothing!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 4 #"))])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 16 #"draw-one-circle!" +0 0 24 3 1 #" " +0 0 14 3 5 #"lefts" +0 0 24 3 1 #" " +0 0 14 3 4 #"tops" +0 0 24 3 1 #" " +0 0 14 3 6 #"widths" +0 0 24 3 1 #" " +0 0 14 3 7 #"heights" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 22 #";;;Procedure:roman-num" +0 0 24 29 1 #"\n" +0 0 17 3 28 #";;;Parameter:image, an image" +0 0 24 29 1 #"\n" +0 0 17 3 70 +( + #";;; h, a positive number, the central col of the roman numb" + #"er" +) 0 0 24 29 1 #"\n" +0 0 17 3 70 +( + #";;; k, a positive number, the central row of the roman numb" + #"er" +) 0 0 24 29 1 #"\n" +0 0 17 3 65 +#";;; R, a positive number, the radius of the roman number" +0 0 24 29 1 #"\n" +0 0 17 3 62 +#";;; ratio, the ratio of width and height of the image" +0 0 24 29 1 #"\n" +0 0 17 3 43 #";;; num, a integer between 0 and 9" +0 0 24 29 1 #"\n" +0 0 17 3 132 +( + #";;;Purpose:draw a roman-number on the image centered at (h,k) with R" + #" radius if ratio is 1, with width of 2R*ratio and height of 2R " +) 0 0 24 29 1 #"\n" +0 0 17 3 113 +( + #";;;Produce:roman-numed, a image with a roman number drawed on it, th" + #"e raman number is same as the integer inputed" +) 0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"roman-num" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 1 #"h" +0 0 24 3 1 #" " +0 0 14 3 1 #"k" +0 0 24 3 1 #" " +0 0 14 3 1 #"R" +0 0 24 3 1 #" " +0 0 14 3 5 #"ratio" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 4 #"urow" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 1 #"k" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 1 #"R" +0 0 24 3 1 #" " +0 0 21 3 3 #"1.5" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"lrow" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 1 #"k" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 1 #"R" +0 0 24 3 1 #" " +0 0 21 3 3 #"1.5" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"cols" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 1 #"h" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"r-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 1 #"R" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.8" +0 0 24 3 2 #") " +0 0 21 3 1 #"3" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"r-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 2 #")(" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 5 #"))))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 7 #"my-cols" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 1 #"h" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 14 3 5 #"ratio" +0 0 24 3 5 #"))) (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 5 #"ratio" +0 0 24 3 2 #") " +0 0 14 3 4 #"cols" +0 0 24 3 4 #"))])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"lrow" +0 0 24 29 1 #"\n" +0 0 24 3 38 #" (" +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"my-cols" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 37 #" " +0 0 14 3 4 #"urow" +0 0 24 3 6 #")]))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 65 +#";;;;;;;;;;;;;;;;;;;;;;;;;;;;procedures for tree;;;;;;;;;;;;;;;;;;" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 29 #";;;Procedure:draw-big-circles" +0 0 24 29 1 #"\n" +0 0 17 3 28 #";;;Parameter:image, an image" +0 0 24 29 1 #"\n" +0 0 17 3 66 +#";;; c-num, an positive integer, the number of the circles" +0 0 24 29 1 #"\n" +0 0 17 3 47 #";;; left, the left edge of the circles" +0 0 24 29 1 #"\n" +0 0 17 3 45 #";;; top, the top edge of the circles" +0 0 24 29 1 #"\n" +0 0 17 3 135 +( + #";;;Purpose:draw concentric circles of c-num on the image with radius" + #" of width or height/5, if width and height of the image is the same" +) 0 0 24 29 1 #"\n" +0 0 17 3 110 +( + #";;; draw concentric ellipse of c-num on the image with width " + #"of image-width/5, height of image-height/5" +) 0 0 24 29 1 #"\n" +0 0 17 3 76 +( + #";;;Produce:nothing, draw draw concentric circles(ellipses) of c-num " + #"on image" +) 0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 16 #"draw-big-circles" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 5 #"c-num" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 5 #"width" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 1 #"5" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"height" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 12 #"image-height" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 1 #"5" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"b-hdis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"15" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"b-vdis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"15" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"hdis" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-hdis" +0 0 24 3 3 #") (" +0 0 14 3 9 #"list-take" +0 0 24 3 2 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 2 #"11" +0 0 24 3 1 #" " +0 0 21 3 2 #"12" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 3 #") (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 5 #"c-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"vdis" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-vdis" +0 0 24 3 3 #") (" +0 0 14 3 9 #"list-take" +0 0 24 3 2 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 2 #"11" +0 0 24 3 1 #" " +0 0 21 3 2 #"12" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 3 #") (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 5 #"c-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"widths" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 2 #") " +0 0 14 3 4 #"hdis" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 7 #"heights" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #") " +0 0 14 3 4 #"vdis" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 16 #"draw-one-circle!" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 21 #"image-select-ellipse!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 7 #"REPLACE" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 55 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 3 #"row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 4 #")) (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 3 #"col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #")) " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 23 #"image-stroke-selection!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 21 #"image-select-nothing!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 4 #"))])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 16 #"draw-one-circle!" +0 0 24 3 1 #" " +0 0 14 3 6 #"widths" +0 0 24 3 1 #" " +0 0 14 3 7 #"heights" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 31 #";;;Procedure:draw-small-circles" +0 0 24 29 1 #"\n" +0 0 17 3 28 #";;;Parameter:image, an image" +0 0 24 29 1 #"\n" +0 0 17 3 66 +#";;; c-num, an positive integer, the number of the circles" +0 0 24 29 1 #"\n" +0 0 17 3 47 #";;; left, the left edge of the circles" +0 0 24 29 1 #"\n" +0 0 17 3 45 #";;; top, the top edge of the circles" +0 0 24 29 1 #"\n" +0 0 17 3 136 +( + #";;;Purpose:draw concentric circles of c-num on the image with radius" + #" of width or height/10, if width and height of the image is the same" +) 0 0 24 29 1 #"\n" +0 0 17 3 112 +( + #";;; draw concentric ellipse of c-num on the image with width " + #"of image-width/10, height of image-height/10" +) 0 0 24 29 1 #"\n" +0 0 17 3 76 +( + #";;;Produce:nothing, draw draw concentric circles(ellipses) of c-num " + #"on image" +) 0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 18 #"draw-small-circles" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 5 #"c-num" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 5 #"width" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 2 #"10" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"height" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 12 #"image-height" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #") " +0 0 21 3 2 #"10" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 4 #"left" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 3 #"top" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"b-hdis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"15" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"b-vdis" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"15" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"hdis" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-hdis" +0 0 24 3 3 #") (" +0 0 14 3 9 #"list-take" +0 0 24 3 2 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 2 #"11" +0 0 24 3 1 #" " +0 0 21 3 2 #"12" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 3 #") (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 5 #"c-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"vdis" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-vdis" +0 0 24 3 3 #") (" +0 0 14 3 9 #"list-take" +0 0 24 3 2 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 2 #"11" +0 0 24 3 1 #" " +0 0 21 3 2 #"12" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 3 #") (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 5 #"c-num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 6 #"widths" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 2 #") " +0 0 14 3 4 #"hdis" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 7 #"heights" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #") " +0 0 14 3 4 #"vdis" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 16 #"draw-one-circle!" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 21 #"image-select-ellipse!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 7 #"REPLACE" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 55 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 3 #"row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 4 #")) (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 3 #"col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 4 #")) (" +0 0 14 3 7 #"ceiling" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 3 #") (" +0 0 14 3 7 #"ceiling" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 23 #"image-stroke-selection!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 21 #"image-select-nothing!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 4 #"))])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 16 #"draw-one-circle!" +0 0 24 3 1 #" " +0 0 14 3 6 #"widths" +0 0 24 3 1 #" " +0 0 14 3 7 #"heights" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 27 #";;;Procedure:draw-line-same" +0 0 24 29 1 #"\n" +0 0 17 3 30 #";;;Parameter:turtle, a turtle " +0 0 24 29 1 #"\n" +0 0 17 3 53 #";;; left1, the left edge of the first circle" +0 0 24 29 1 #"\n" +0 0 17 3 53 #";;; top1, the top edge of the second circles" +0 0 24 29 1 #"\n" +0 0 17 3 53 #";;; left2, the left edge of the first circle" +0 0 24 29 1 #"\n" +0 0 17 3 53 #";;; top2, the top edge of the second circle " +0 0 24 29 1 #"\n" +0 0 17 3 65 +#";;; hradius, the horizontal radius of the first \"circle\"" +0 0 24 29 1 #"\n" +0 0 17 3 63 +#";;; vradius, the vertical radius of the first \"circle\"" +0 0 24 29 1 #"\n" +0 0 17 3 67 +( + #";;; hradius2, the horizo" + #"ntal radius of the second \"circle\"" +) 0 0 24 29 1 #"\n" +0 0 17 3 65 +#";;; vradius2, the vertical radius of the second \"circle\"" +0 0 24 29 1 #"\n" +0 0 17 3 47 #";;;Purpose: draw a line between two circles " +0 0 24 29 1 #"\n" +0 0 17 3 19 #";;;Produce: nothing" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 14 #"draw-line-same" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 14 3 5 #"left1" +0 0 24 3 1 #" " +0 0 14 3 4 #"top1" +0 0 24 3 1 #" " +0 0 14 3 5 #"left2" +0 0 24 3 1 #" " +0 0 14 3 4 #"top2" +0 0 24 3 1 #" " +0 0 14 3 7 #"hradius" +0 0 24 3 1 #" " +0 0 14 3 7 #"vradius" +0 0 24 3 1 #" " +0 0 14 3 8 #"hradius2" +0 0 24 3 1 #" " +0 0 14 3 8 #"vradius2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 4 #"col1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 5 #"left1" +0 0 24 3 1 #" " +0 0 14 3 7 #"hradius" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"row1" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 4 #"top1" +0 0 24 3 1 #" " +0 0 14 3 7 #"vradius" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"col2" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 5 #"left2" +0 0 24 3 1 #" " +0 0 14 3 8 #"hradius2" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 4 #"row2" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 4 #"top2" +0 0 24 3 1 #" " +0 0 14 3 8 #"vradius2" +0 0 24 3 3 #")])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 16 #"turtle-teleport!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #">" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #">" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 2 #"45" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 2 #" (" +0 0 14 3 10 #"turtle-col" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #"<" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #">" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 3 #"135" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 4 #"-180" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 3 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 10 #"turtle-col" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #") " +0 0 14 3 4 #"col2" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #">" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #"<" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 3 #"-45" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 3 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 2 #" (" +0 0 14 3 10 #"turtle-col" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #"<" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #"<" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 4 #"-135" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 4 #"sqrt" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 3 #"-90" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 3 #" (" +0 0 14 3 1 #"-" +0 0 24 3 2 #" (" +0 0 14 3 10 #"turtle-col" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #") " +0 0 14 3 4 #"col2" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #"<" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 3 #"180" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 3 #" (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 5 #")) )]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #">" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 5 #")) )]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #"<" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 3 #"-90" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 5 #")) )]" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" [(" +0 0 14 3 3 #"and" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 4 #"col2" +0 0 24 3 1 #" " +0 0 14 3 4 #"col1" +0 0 24 3 3 #") (" +0 0 14 3 1 #">" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 12 #"turtle-face!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 1 #" " +0 0 21 3 2 #"90" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 15 #"turtle-forward!" +0 0 24 3 1 #" " +0 0 14 3 6 #"turtle" +0 0 24 3 2 #" (" +0 0 14 3 3 #"abs" +0 0 24 3 1 #"(" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 4 #"row1" +0 0 24 3 1 #" " +0 0 14 3 4 #"row2" +0 0 24 3 5 #")) )]" +0 0 24 29 1 #"\n" +0 0 24 3 16 #" ))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 30 #";;;Procedure:generate-big-list" +0 0 24 29 1 #"\n" +0 0 17 3 40 #";;;Parameter:num, an integer between 0~9" +0 0 24 29 1 #"\n" +0 0 17 3 118 +( + #";;;Purpose:generate a list of numbers, later will be used as either " + #"the x or y coordinate of big circles in the tree " +) 0 0 24 29 1 #"\n" +0 0 17 3 37 #";;;Produce:generated-big-list, a list" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 17 #"generate-big-list" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 3 #"num" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 6 #"b-list" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"r-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm1" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sin" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 2 #") " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm2" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"cos" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 2 #") " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm3" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm4" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 6 #"))))])" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 3 #"5.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"2.5" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 3 #"4.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"3.5" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 2 #"pi" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 3 #")) " +0 0 14 3 6 #"b-list" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm2" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 2 #"pi" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 3 #")) " +0 0 14 3 6 #"b-list" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm3" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-list" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm4" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-list" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 3 #"5.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"5.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"7.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"7.5" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 4 #"0.25" +0 0 24 3 3 #") (" +0 0 14 3 7 #"reverse" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.8" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 5 #"))))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 4 #"0.25" +0 0 24 3 3 #") (" +0 0 14 3 7 #"reverse" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.8" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 5 #"))))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 4 #"0.25" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.8" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 4 #"0.25" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.8" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 8 #")))]))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 32 #";;;Procedure:generate-small-list" +0 0 24 29 1 #"\n" +0 0 17 3 40 #";;;Parameter:num, an integer between 0~9" +0 0 24 29 1 #"\n" +0 0 17 3 120 +( + #";;;Purpose:generate a list of numbers, later will be used as either " + #"the x or y coordinate of small circles in the tree " +) 0 0 24 29 1 #"\n" +0 0 17 3 39 #";;;Produce:generated-small-list, a list" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 19 #"generate-small-list" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 3 #"num" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 6 #"b-list" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"r-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm1" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"4.5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"sin" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 2 #") " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm2" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"4.5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 2 #" (" +0 0 14 3 3 #"cos" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 2 #") " +0 0 21 3 1 #"1" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm3" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [" +0 0 14 3 3 #"fm4" +0 0 24 3 2 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 1 #"n" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 19 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sqr" +0 0 24 3 1 #" " +0 0 14 3 1 #"n" +0 0 24 3 6 #"))))])" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 3 #"4.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"4.5" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm1" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 2 #"pi" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 3 #")) " +0 0 14 3 6 #"b-list" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm2" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 2 #"pi" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 2 #"pi" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 3 #")) " +0 0 14 3 6 #"b-list" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm3" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-list" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 3 #"fm4" +0 0 24 3 1 #" " +0 0 14 3 6 #"b-list" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 3 #"4.5" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.9" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.9" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.9" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" [(" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 12 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.5" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.9" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 8 #")))]))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 22 #";;;Procedure:draw-tree" +0 0 24 29 1 #"\n" +0 0 17 3 49 #";;;Parameter:num, an positive integer of 3 digits" +0 0 24 29 1 #"\n" +0 0 17 3 63 +#";;; width, an positive integer, the width of the image" +0 0 24 29 1 #"\n" +0 0 17 3 65 +#";;; height, an positive integer, the height of the image" +0 0 24 29 1 #"\n" +0 0 17 3 88 +( + #";;;Purpose:to draw a magic tree, the hundreds digit determines the c" + #"olor of the tree " +) 0 0 24 29 1 #"\n" +0 0 17 3 99 +( + #";;; the tens digit determines the posit" + #"ions of the circles on the tree" +) 0 0 24 29 1 #"\n" +0 0 17 3 128 +( + #";;; the unit digit determines the numbe" + #"r of circles inside each of the biggest circle of the tree " +) 0 0 24 29 1 #"\n" +0 0 17 3 32 #";;;Produce:drawed-tree, am image" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"draw-tree" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 4 #"nums" +0 0 24 3 2 #" (" +0 0 14 3 9 #"split-num" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 4 #"fnum" +0 0 24 3 2 #" (" +0 0 14 3 3 #"car" +0 0 24 3 1 #" " +0 0 14 3 4 #"nums" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 4 #"snum" +0 0 24 3 2 #" (" +0 0 14 3 4 #"cadr" +0 0 24 3 1 #" " +0 0 14 3 4 #"nums" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 4 #"tnum" +0 0 24 3 2 #" (" +0 0 14 3 5 #"caddr" +0 0 24 3 1 #" " +0 0 14 3 4 #"nums" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 9 #"image-new" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 5 #"tommy" +0 0 24 3 2 #" (" +0 0 14 3 10 #"turtle-new" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 10 #"unit-width" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 11 #"unit-height" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 6 #"widths" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-width" +0 0 24 3 3 #") (" +0 0 14 3 17 #"generate-big-list" +0 0 24 3 1 #" " +0 0 14 3 4 #"snum" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 7 #"heights" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 11 #"unit-height" +0 0 24 3 3 #") (" +0 0 14 3 17 #"generate-big-list" +0 0 24 3 2 #" (" +0 0 14 3 9 #"remainder" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 14 3 4 #"snum" +0 0 24 3 2 #") " +0 0 21 3 2 #"10" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 8 #"s-widths" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-width" +0 0 24 3 3 #") (" +0 0 14 3 19 #"generate-small-list" +0 0 24 3 1 #" " +0 0 14 3 4 #"snum" +0 0 24 3 3 #"))]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 9 #"s-heights" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 14 3 11 #"unit-height" +0 0 24 3 3 #") (" +0 0 14 3 19 #"generate-small-list" +0 0 24 3 2 #" (" +0 0 14 3 9 #"remainder" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 14 3 4 #"snum" +0 0 24 3 2 #") " +0 0 21 3 2 #"10" +0 0 24 3 4 #")))]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 7 #"fgcolor" +0 0 24 3 2 #" (" +0 0 14 3 14 #"generate-color" +0 0 24 3 1 #" " +0 0 14 3 4 #"fnum" +0 0 24 3 3 #")])" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 7 #"draw-bg" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 7 #"fgcolor" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 20 #"context-set-fgcolor!" +0 0 24 3 2 #" (" +0 0 14 3 12 #"irgb-lighter" +0 0 24 3 2 #" (" +0 0 14 3 12 #"irgb-lighter" +0 0 24 3 1 #" " +0 0 14 3 7 #"fgcolor" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 18 #"context-set-brush!" +0 0 24 3 1 #" " +0 0 19 3 15 #"\"Star Brush #2\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 11 #"image-blot!" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-col1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-row1" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 20 #"context-set-fgcolor!" +0 0 24 3 1 #" " +0 0 19 3 7 #"\"white\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 11 #"image-blot!" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-col2" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-row2" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 20 #"context-set-fgcolor!" +0 0 24 3 1 #" " +0 0 14 3 7 #"fgcolor" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 18 #"context-set-brush!" +0 0 24 3 1 #" " +0 0 19 3 6 #"\"Nova\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 16 #"draw-big-circles" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 36 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 1 #" " +0 0 14 3 4 #"tnum" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 35 #" " +0 0 14 3 6 #"widths" +0 0 24 29 1 #"\n" +0 0 24 3 35 #" " +0 0 14 3 7 #"heights" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 18 #"draw-small-circles" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 36 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 1 #" " +0 0 14 3 4 #"tnum" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 35 #" " +0 0 14 3 8 #"s-widths" +0 0 24 29 1 #"\n" +0 0 24 3 35 #" " +0 0 14 3 9 #"s-heights" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 17 #"turtle-set-brush!" +0 0 24 3 1 #" " +0 0 14 3 5 #"tommy" +0 0 24 3 1 #" " +0 0 19 3 6 #"\"Nova\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 17 #"turtle-set-color!" +0 0 24 3 1 #" " +0 0 14 3 5 #"tommy" +0 0 24 3 1 #" " +0 0 14 3 7 #"fgcolor" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 14 #"draw-line-same" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 14 3 5 #"tommy" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 6 #"widths" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"heights" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 6 #"widths" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"heights" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 14 #"draw-line-same" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 1 #" " +0 0 14 3 5 #"tommy" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 8 #"s-widths" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 9 #"s-heights" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 8 #"s-widths" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 9 #"s-heights" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"20" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"20" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"20" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"20" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 14 #"draw-line-same" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 14 3 5 #"tommy" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 6 #"widths" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 7 #"heights" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"3" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"6" +0 0 24 3 1 #" " +0 0 21 3 1 #"7" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 8 #"s-widths" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 8 #"list-ref" +0 0 24 3 1 #" " +0 0 14 3 9 #"s-heights" +0 0 24 3 3 #") (" +0 0 14 3 4 #"list" +0 0 24 3 1 #" " +0 0 21 3 1 #"1" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 1 #" " +0 0 21 3 1 #"8" +0 0 24 3 1 #" " +0 0 21 3 1 #"9" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"20" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 32 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 1 #"5" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"20" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 22 #"image-refresh-display!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 10 #"image-show" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 4 #"))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 52 #";;;;;;;;;;;;;;;;;;;;;;;;;magic 1;;;;;;;;;;;;;;;;;;;;" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 22 #";;;Procedure:draw-star" +0 0 24 29 1 #"\n" +0 0 17 3 29 #";;;Parameter:image, an image " +0 0 24 29 1 #"\n" +0 0 17 3 53 #";;; width, the width of the star to be drawn" +0 0 24 29 1 #"\n" +0 0 17 3 55 #";;; height, the height of the star to be drawn" +0 0 24 29 1 #"\n" +0 0 17 3 55 #";;;Purpose: to draw a star of width*height on image " +0 0 24 29 1 #"\n" +0 0 17 3 31 #";;;Produce:drawn-star, an image" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 9 #"draw-star" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 3 #"let" +0 0 24 3 3 #" ([" +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 11 #"image-width" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 21 3 1 #"2" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 12 #"image-height" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 21 3 1 #"2" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 10 #"unit-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 1 #"4" +0 0 24 3 1 #" " +0 0 14 3 2 #"pi" +0 0 24 3 2 #") " +0 0 21 3 1 #"5" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 2 #"pi" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #")])" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 1 #" " +0 0 17 3 20 #";col1 row1 col2 row2" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 4 #"))))" +0 0 17 3 11 #";bottomleft" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 5 #")))))" +0 0 17 3 11 #";bottomleft" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 3 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 4 #"))))" +0 0 17 3 12 #";bottomright" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 4 #"))))" +0 0 17 3 12 #";bottomright" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 5 #")))))" +0 0 17 3 8 #";topleft" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 6 #"))))))" +0 0 17 3 8 #";topleft" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 3 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 5 #")))))" +0 0 17 3 8 #";topleft" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 5 #")))))" +0 0 17 3 8 #";topleft" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 5 #")))))" +0 0 17 3 9 #";topright" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 6 #"))))))" +0 0 17 3 9 #";topright" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 5 #")))))" +0 0 17 3 9 #";topright" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 5 #")))))" +0 0 17 3 9 #";topright" +0 0 24 29 1 #"\n" +0 0 24 3 26 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 4 #"))))" +0 0 17 3 11 #";bottomleft" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 5 #")))))" +0 0 17 3 11 #";bottomleft" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 16 #"image-draw-line!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" " +0 0 24 29 1 #"\n" +0 0 24 3 26 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"cos" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 4 #"))))" +0 0 17 3 12 #";bottomright" +0 0 24 29 1 #"\n" +0 0 24 3 26 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 3 #") (" +0 0 14 3 3 #"sin" +0 0 24 3 2 #" (" +0 0 14 3 1 #"+" +0 0 24 3 1 #" " +0 0 14 3 11 #"start-angle" +0 0 24 3 1 #" " +0 0 14 3 10 #"unit-angle" +0 0 24 3 4 #"))))" +0 0 17 3 12 #";bottomright" +0 0 24 29 1 #"\n" +0 0 24 3 25 #" " +0 0 14 3 11 #"central-col" +0 0 24 3 1 #" " +0 0 17 3 20 #";col1 row1 col2 row2" +0 0 24 29 1 #"\n" +0 0 24 3 26 #" (" +0 0 14 3 1 #"-" +0 0 24 3 1 #" " +0 0 14 3 11 #"central-row" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 1 #"2" +0 0 24 3 7 #")))))))" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 24 29 1 #"\n" +0 0 17 3 31 #";;;Procedure:draw-magic-circle1" +0 0 24 29 1 #"\n" +0 0 17 3 51 #";;;Parameter:num, an positive integer between 1~999" +0 0 24 29 1 #"\n" +0 0 17 3 57 #";;; width, a positive number, width of the image" +0 0 24 29 1 #"\n" +0 0 17 3 59 +#";;; height, a positive number, height of the image" +0 0 24 29 1 #"\n" +0 0 17 3 44 #";;;Purpose: to draw the first magic circle, " +0 0 24 29 1 #"\n" +0 0 17 3 70 +( + #";;; hundres digit determines the number of roman number show" + #"ed" +) 0 0 24 29 1 #"\n" +0 0 17 3 57 #";;; tens digit determines the number of the stars" +0 0 24 29 1 #"\n" +0 0 17 3 59 +#";;; unit digit determines the number of the circles" +0 0 24 29 1 #"\n" +0 0 17 3 34 #";;;Produce:magic-circle1, an image" +0 0 24 29 1 #"\n" +0 0 24 3 1 #"(" +0 0 15 3 6 #"define" +0 0 24 3 1 #" " +0 0 14 3 18 #"draw-magic-circle1" +0 0 24 29 1 #"\n" +0 0 24 3 3 #" (" +0 0 15 3 6 #"lambda" +0 0 24 3 2 #" (" +0 0 14 3 3 #"num" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 5 #" (" +0 0 15 3 4 #"let*" +0 0 24 3 3 #" ([" +0 0 14 3 4 #"nums" +0 0 24 3 2 #" (" +0 0 14 3 9 #"split-num" +0 0 24 3 1 #" " +0 0 14 3 3 #"num" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 4 #"fnum" +0 0 24 3 2 #" (" +0 0 14 3 3 #"car" +0 0 24 3 1 #" " +0 0 14 3 4 #"nums" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 4 #"snum" +0 0 24 3 2 #" (" +0 0 14 3 4 #"cadr" +0 0 24 3 1 #" " +0 0 14 3 4 #"nums" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 4 #"tnum" +0 0 24 3 2 #" (" +0 0 14 3 5 #"caddr" +0 0 24 3 1 #" " +0 0 14 3 4 #"nums" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 5 #"ratio" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")]" +0 0 24 29 1 #"\n" +0 0 24 3 11 #" [" +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 9 #"image-new" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 3 #")])" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 20 #"context-set-fgcolor!" +0 0 24 3 1 #" " +0 0 19 3 7 #"\"black\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 17 #"image-select-all!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 21 #"image-fill-selection!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 21 #"image-select-nothing!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 7 #"draw-bg" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 2 #" (" +0 0 14 3 16 #"color-name->irgb" +0 0 24 3 1 #" " +0 0 19 3 15 #"\"palegoldenrod\"" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 9 #"draw-star" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 20 #"context-set-fgcolor!" +0 0 24 3 1 #" " +0 0 19 3 7 #"\"white\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 11 #"image-blot!" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-col2" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-row2" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 11 #"image-blot!" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-col1" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 29 #" (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 7 #"ceiling" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 1 #" " +0 0 21 3 2 #"25" +0 0 24 3 3 #")) " +0 0 14 3 9 #"star-row1" +0 0 24 3 3 #")))" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 20 #"context-set-fgcolor!" +0 0 24 3 1 #" " +0 0 19 3 15 #"\"palegoldenrod\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 18 #"context-set-brush!" +0 0 24 3 1 #" " +0 0 19 3 6 #"\"Nova\"" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 21 #"image-select-ellipse!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 7 #"REPLACE" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 13 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.1" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.1" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.8" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.8" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 23 #"image-stroke-selection!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 21 #"image-select-ellipse!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 7 #"REPLACE" +0 0 24 3 1 #" " +0 0 24 29 1 #"\n" +0 0 24 3 13 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.2" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.2" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.6" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.6" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 23 #"image-stroke-selection!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 21 #"image-select-nothing!" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #")" +0 0 24 29 1 #"\n" +0 0 24 3 2 #" " +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 4 #"tnum" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 14 #" (" +0 0 14 3 20 #"draw-central-circles" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 1 #" " +0 0 14 3 4 #"tnum" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.4" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.4" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 2 #")(" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.6" +0 0 24 3 1 #" " +0 0 14 3 5 #"width" +0 0 24 3 3 #") (" +0 0 14 3 1 #"*" +0 0 24 3 1 #" " +0 0 21 3 3 #"0.6" +0 0 24 3 1 #" " +0 0 14 3 6 #"height" +0 0 24 3 4 #"))])" +0 0 24 29 1 #"\n" +0 0 24 3 6 #" " +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 15 3 4 #"cond" +0 0 24 3 3 #" [(" +0 0 14 3 3 #"not" +0 0 24 3 2 #" (" +0 0 14 3 1 #"=" +0 0 24 3 1 #" " +0 0 14 3 4 #"snum" +0 0 24 3 1 #" " +0 0 21 3 1 #"0" +0 0 24 3 2 #"))" +0 0 24 29 1 #"\n" +0 0 24 3 7 #" (" +0 0 14 3 8 #"for-each" +0 0 24 3 1 #" " +0 0 14 3 9 #"draw-star" +0 0 24 3 2 #" (" +0 0 14 3 9 #"make-list" +0 0 24 3 1 #" " +0 0 14 3 4 #"snum" +0 0 24 3 1 #" " +0 0 14 3 5 #"image" +0 0 24 3 3 #") (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"l-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"*" +0 0 24 3 2 #" (" +0 0 14 3 1 #"*" +0 0 24 3 2 #" " +0 0 14 3 5 #"width" +0 0 24 3 1 #" " +0 0 21 3 4 #"0.45" +0 0 24 3 4 #")) (" +0 0 14 3 3 #"map" +0 0 24 3 1 #" " +0 0 14 3 9 #"increment" +0 0 24 3 2 #" (" +0 0 14 3 3 #"map" +0 0 24 3 2 #" (" +0 0 14 3 3 #"r-s" +0 0 24 3 1 #" " +0 0 14 3 1 #"/" +0 0 24 3 1 #" " +0 0 21 3 2 #"10" +0 0 24 3 3 #") (" +0 0 14 3 4 #"iota" +0 0 24 3 1 #" " +0 0 14 3 4 #"snum" +0 0 24 3 4 \ No newline at end of file diff --git a/1.png b/1.png deleted file mode 100644 index 1bbb0af..0000000 Binary files a/1.png and /dev/null differ diff --git a/2.jpg b/2.jpg deleted file mode 100644 index 78ca960..0000000 Binary files a/2.jpg and /dev/null differ diff --git a/3.jpg b/3.jpg deleted file mode 100644 index 797a9a4..0000000 Binary files a/3.jpg and /dev/null differ diff --git a/4.jpg b/4.jpg deleted file mode 100644 index a4157ac..0000000 Binary files a/4.jpg and /dev/null differ diff --git a/5.jpg b/5.jpg deleted file mode 100644 index 71a2b9c..0000000 Binary files a/5.jpg and /dev/null differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..43f48e0 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# CSC151Project +Design Statement + +While incorporating color variation, our project mainly explores shapes in our project with certain level of predictability. +In the following design statement, we will first introduce the calling and product of the procedure as well as its purpose. +Second, we will delve deeper into the elements and principles of two dimensional design used in our procedure. Then we will +evaluate the colors used in forming the products of the procedure and give a summary of the implications of our procedure. +When the user calls our procedure, he/she will input three parameters, a number between 1~999, the width and the height of +the image generated. Our main idea is to develop the procedure into a game which users can play it by making successive calls +with different first parameter. The game has five levels and each correspond to 10 of the possible 1000 pictures. First the +user start with the starting picture and get the clue(by counting certain geometric drawings -stars, squares that correspond +to the three digit of next picture's index) from the picture generated to guess the index(the first parameter) of the next +picture he/she is supposed to call. By calling right pictures in turn the user can pass five levels(that is 50 key pictures) +and reach the final picture. However, if the user make the wrong call, the picture generated will be clearly different than +expected thus can inform the user that he/she has made the wrong call. + +In our project we intend to use several design elements such as Picture plane, Positive space/shape, Negative space/shape, Line, +Value, and Color. The fifty pictures representing five levels will be in the form of magic circles with five kinds of patterns +and the rest pictures will be in the form of a magic tree. (more specific please see technique statement). + +Also we will follow various design principles such as Balance, Unity and Variety, Scale, Proportion, and Rhythm. Our pictures will +be in certain symmetry with imbalance in some point(Balance). The pattern of the picture generated will include grouping, repetition, +proximity, continuity, pattern and grid(Unity and Variety). Also part of the picture will contain concentric geometric drawings(Scale). +Meanwhile, users are expected to see different patterns(lines, squares, circles) with different sizes(Proportion) and multiple units +in a deliberate pattern(Rhythm) present in one picture. (To understand more specifically, please see the attached sketches of images) + +After studying the color theory, we plan to give each ten of the 50 key pictures a theme color while using the same theme color +in the rest of the pictures(all of the pictures will use dark colors, that is a colors with small Value, as base colors). The +corresponding theme colors of each of five levels will be green, red, yellow, blue and white(mostly Primary colors and Secondary +colors) with the other pictures use pink-purple as a theme color. Each of the theme color is intend to be considerably bright, +that is with large Saturation. Because in our pictures we will use primarily lines and hollow graphics than color blocks, the +user can interpret the pictures as drawing with pens on a paper. + +In conclusion, our project is intend to engage the people who call our procedure in the game while showing them magical pictures. +For more technical details and illustrations please read the technique statement and see the sketched images. + +Reference: +www.cs.grinnell.edu/~klingeti/courses/f2016/csc151/assignments/projectdesign statement technique statement +http://www.cs.grinnell.edu/~klingeti/courses/f2016/csc151/readings/design-elements-reading.html +http://www.cs.grinnell.edu/~klingeti/courses/f2016/csc151/readings/design-and-color-reading.html +http://www.bartleby.com/141/strunk5.html + +technique statement + +We split the number the user put in into three parts: the hundreds digit, the tens digit, and the units digit, and each of them +will control a certain character of our image. + +We mainly use GIMP tools(selection, stroke, draw line...), turtles and image-compute for both kind of pictures (the magic circle +and magic tree). + +In the three sample we provide for the magic tree, the non-key pictures, the hundreds digit controls the color(numbers 0-9 correspond +to 10 different colors, 0 means nothing at hundreds digit), the tens digit controls the distribution of circles(umbers 0-9 correspond +to 10 different patterns), and the units digit controls the quantity of concentric circles(0 means 1 circle,5 means 6 circles etc.). +This will ensure us to generate 950 different magical trees.(A condition is used here to ensure if the right number for the game is +inputed, a magic circle will be generated instead of a magic tree). + +On the other hand, we will also use GIMP tools, turtles and image-compute for the 50 key images. + +The mathematical techniques we used include conic section, trigonometric function, etc. We used conic section computation to draw the +oval on the background, and trigonometric function to draw the halo. + + diff --git a/game b/game new file mode 100644 index 0000000..85c07f0 --- /dev/null +++ b/game @@ -0,0 +1,104 @@ +#lang racket + +(define game + (lambda (x width height) + (cond [(= x 0) + (draw-magic-circle1 311 width height)] + [(or (= x 311) + (= x 324) + (= x 339) + (= x 356) + (= x 375) + (= x 396) + (= x 419) + (= x 444) + (= x 471)) + (draw-magic-circle1 (+ 275 (sqr (+ 5 (+ 1 (- (sqrt (- x 275)) 5))))) width height)] + + [(= x 500) + (draw-magic-circle2 28 width height)] + + [(or (= x 28) + (= x 66) + (= x 114) + (= x 172) + (= x 240) + (= x 318) + (= x 406) + (= x 504) + (= x 612)) + (draw-magic-circle2 (* 5 (- (sqr (+ 2.3 (+ 1 (- (sqrt (+ (/ x 5) 5.29)) 2.3)))) 5.29)) width height)] + + [(= x 730) + (draw-magic-circle3 841 width height)] + + [(= x 841) + (draw-magic-circle3 909 width height)] + [(= x 909) + (draw-magic-circle3 141 width height)] + [(= x 141) + (draw-magic-circle3 756 width height)] + [(= x 756) + (draw-magic-circle3 958 width height)] + [(= x 958) + (draw-magic-circle3 279 width height)] + [(= x 279) + (draw-magic-circle3 656 width height)] + [(= x 656) + (draw-magic-circle3 989 width height)] + [(= x 989) + (draw-magic-circle3 412 width height)] + [(= x 412) + (draw-magic-circle3 544 width height)] + + + [(= x 544) + (draw-magic-circle4 17 width height)] + + [(or (= x 17) + (= x 49) + (= x 97) + (= x 161) + (= x 241) + (= x 337) + (= x 433) + (= x 545) + (= x 657)) + (draw-magic-circle4 (+ 1 (* 16 (expt (+ 1 (expt (/ (- x 1) 16) (/ 1 1.7))) 1.7))) width height)] + + [(= x 801) + (draw-magic-circle5 540 width height)] + + + [(= x 540) + (draw-magic-circle5 416 width height)] + [(= x 416) + (draw-magic-circle5 989 width height)] + [(= x 989) + (draw-magic-circle5 653 width height)] + [(= x 653) + (draw-magic-circle5 283 width height)] + [(= x 283) + (draw-magic-circle5 960 width height)] + [(= x 960) + (draw-magic-circle5 753 width height)] + [(= x 753) + (draw-magic-circle5 145 width height)] + [(= x 145) + (draw-magic-circle5 911 width height)] + [(= x 911) + (draw-magic-circle5 839 width height)] + + [(= x 839) + (define source (image-load "/home/chenziwe/Desktop/project/zhihuishu.jpg")) + (define target (image-new width height)) + (image-copy-paste-block! + source 0 0 + target 0 0 width height)] + + + [else (draw-tree x width height)] + ) + + + )) \ No newline at end of file diff --git a/game~ b/game~ new file mode 100644 index 0000000..0cf60dc --- /dev/null +++ b/game~ @@ -0,0 +1,7 @@ +#lang racket + +(define game + (lambda (num width height) + + + )) \ No newline at end of file diff --git a/magic circle2 b/magic circle2 deleted file mode 100644 index b9d6fde..0000000 --- a/magic circle2 +++ /dev/null @@ -1,287 +0,0 @@ -#lang racket -(require gigls/unsafe) - - -(define split-num - (lambda (num) - (list (quotient num 100) - (remainder (quotient num 10) 10) - (remainder num 10)) - ) - ) - - -(define draw-central-circles - (lambda (image circle-num left top right bottom) - (let* (;[width (/ (image-width image) 5)] - ;[height (/ (image-height image) 5)] - ;[row (+ left (/ width 2))] - ;[col (+ top (/ height 2))] - ;[b-dis (/ width 15)] - ;[dis (map (l-s * b-dis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] - ;[widths (map (l-s - width) dis)] - [x-dis (/ (- right left) circle-num 2)] - [y-dis (/ (- bottom top) circle-num 2)] - [lefts (map (l-s + left) (map (l-s * x-dis) (iota circle-num)))] - [tops (map (l-s + top) (map (l-s * y-dis) (iota circle-num)))] - [widths (map (l-s - (- right left)) (map (l-s * (* x-dis 2)) (iota circle-num)))] - [heights (map (l-s - (- bottom top)) (map (l-s * (* y-dis 2)) (iota circle-num)))] - ;[heights (map (l-s - height) dis)] - [draw-one-circle! (lambda (l t width height) - (image-select-ellipse! image REPLACE - l t width height) - (image-stroke-selection! image) - (image-select-nothing! image) - )]) - (for-each draw-one-circle! lefts tops widths heights) - ) - - ) - - ) - -(define draw-pos-triangle - (lambda (image width height) - (let ([central-col (/ (image-width image)2)] - [central-row (/ (image-height image)2)] - [unit-angle (/ (* pi 2) 3)] - [start-angle (/ pi 2)]) - ; (let kernel ([line-so-far 0] - ; ) - ; (if (= line-so-far num) - ; (image-refresh-display! image) - (image-draw-line! image central-col ;col1 row1 col2 row2 - (- central-row (* (/ height 2))) - (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia - (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia - (image-draw-line! image (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia - (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia - (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia - (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia - (image-draw-line! image - (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia - (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia - central-col ;col1 row1 col2 row2 - (- central-row (* (/ height 2))));zuoxia - ))) - -(define draw-neg-triangle - (lambda (image width height) - (let ([central-col (/ (image-width image)2)] - [central-row (/ (image-height image)2)] - [unit-angle (/ (* pi 2) 3)] - [start-angle (/ pi 2)]) - ; (let kernel ([line-so-far 0] - ; ) - ; (if (= line-so-far num) - ; (image-refresh-display! image) - (image-draw-line! image central-col ;col1 row1 col2 row2 - (+ central-row (* (/ height 2))) - (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia - (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia - (image-draw-line! image (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia - (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia - (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia - (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia - (image-draw-line! image - (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia - (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia - central-col ;col1 row1 col2 row2 - (+ central-row (* (/ height 2))));zuoxia - ))) - -(define 25-num - (lambda () - (let kernel ([list-so-far '()] - [n 25]) - (cond [(< n 1) - list-so-far] - [else (kernel (cons (random 25) list-so-far) - (- n 1))]) - - )) - ) - -(define star-col1 (25-num)) -(define star-row1 (25-num)) -(define star-col2 (25-num)) -(define star-row2 (25-num)) - -(define draw-bg - (lambda (image color) - (let* ([bgcolor (irgb (- (irgb-red color) 50) - (- (irgb-green color) 50) - (- (irgb-blue color) 50))] - [bgcolor2 (irgb (- (irgb-red color) 240) - (- (irgb-green color) 240) - (- (irgb-blue color) 240))] - [icolor (irgb-complement bgcolor)] - [innercolor (irgb (- (irgb-red icolor) 50) - (- (irgb-green icolor) 50) - (- (irgb-blue icolor) 50))] - [center-col (/ (image-width image) 2)] - [center-row (/ (image-height image) 2)] - [h-axis (/ (image-width image) 5)] - [v-axis (/ (image-width image) 10)] - [a h-axis] - [b v-axis] - [r1 (lambda (x y) (floor (/ (* 1.1 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 1.1 a) (* 1.1 b)))) - (/ (sqr (- y center-row)) - (+ (sqr (- x center-col)) - (sqr (- y center-row))))))))))] - [r2 (lambda (x y) (floor (/ (* 2 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 2 a) (* 2 b)))) - (/ (sqr (- y center-row)) - (+ (sqr (- x center-col)) - (sqr (- y center-row))))))))))] - [r3 (lambda (x y) (floor (/ (* 0.9 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 0.9 a) (* 0.9 b)))) - (/ (sqr (- y center-row)) - (+ (sqr (- x center-col)) - (sqr (- y center-row))))))))))] - - [bg (image-compute - (lambda (x y) - (cond - [(and (> (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) - (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) - (or (not (= x center-col)) (not (= y center-row)))) - (irgb (* (irgb-red bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) - (* (irgb-green bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) - (* (irgb-blue bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3)))))) - - ] - [(and (> (+ (/ (sqr(- x center-col)) (sqr h-axis)) - (/ (sqr(- y center-row)) (sqr v-axis))) 1) - (<= (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) - (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) - (or (not (= x center-col)) (not (= y center-row)))) - (irgb (- (irgb-red bgcolor) - (* (/ (- (sqrt (+ (sqr (- x center-col)) - (sqr (- y center-row)))) - (r1 x y)) - (- (r2 x y) (r1 x y))) - (irgb-red bgcolor))) - (- (irgb-green bgcolor) - (* (/ (- (sqrt (+ (sqr (- x center-col)) - (sqr (- y center-row)))) - (r1 x y)) - (- (r2 x y) (r1 x y))) - (irgb-green bgcolor))) - (- (irgb-blue bgcolor) - (* (/ (- (sqrt (+ (sqr (- x center-col)) - (sqr (- y center-row)))) - (r1 x y)) - (- (r2 x y) (r1 x y))) - (irgb-blue bgcolor)))) - - ] - [(and (<= (+ (/ (sqr(- x center-col)) (sqr h-axis)) - (/ (sqr(- y center-row)) (sqr v-axis))) 1) - (or (not (= x center-col)) (not (= y center-row)))) - (irgb (+ (irgb-red innercolor) - (* (/ (sqrt (+ (sqr (- x center-col)) - (sqr (- y center-row)))) - (r3 x y)) - (- (irgb-red bgcolor) (irgb-red innercolor)))) - (+ (irgb-green innercolor) - (* (/ (sqrt (+ (sqr (- x center-col)) - (sqr (- y center-row)))) - (r3 x y)) - (- (irgb-green bgcolor) (irgb-green innercolor)))) - (+ (irgb-blue innercolor) - (* (/ (sqrt (+ (sqr (- x center-col)) - (sqr (- y center-row)))) - (r3 x y)) - (- (irgb-blue bgcolor) (irgb-blue innercolor))))) - - ] - [else innercolor] - - )) - (image-width image) (image-height image) - )] - - ) - (image-copy-paste-block! bg 0 0 image 0 0 (image-width image) (image-height image)) - ) - - )) - - -(define draw-magic-circle2 - (lambda (num width height) - (let* ([nums (split-num num)] - [fnum (car nums)] - [snum (cadr nums)] - [tnum (caddr nums)] - [image (image-new width height)] - [shorter (min width height)] - [unit-width (/ width 10)] - [unit-height (/ height 10)] - [widths (list-take (map (l-s * unit-width) (list 3 5 0 8 2 6 1 7 3 5)) (+ 1 snum))] - [heights (list-take (map (l-s * unit-height)(list 1 1 2 2 3 3 5 5 7 7)) (+ 1 snum))] - - ) - (context-set-fgcolor! "black") - (image-select-all! image) - (image-fill-selection! image) - (image-select-nothing! image) - (draw-bg image (irgb 255 255 255)) - (draw-pos-triangle image width height) - (draw-neg-triangle image width height) - (context-set-fgcolor! "white") - (for-each image-blot! (make-list 25 image) - (map ceiling (map (l-s * (/ width 25)) star-col2)) - (map ceiling (map (l-s * (/ height 25)) star-row2))) - (for-each image-blot! (make-list 25 image) - (map ceiling (map (l-s * (/ width 25)) star-col1)) - (map ceiling (map (l-s * (/ height 25)) star-row1))) - (context-set-fgcolor! 16448210) - (context-set-brush! "Nova") - ; (context-set-fgcolor! (irgb 0 170 100)) - (image-select-ellipse! image REPLACE - (* 0.1 width) (* 0.1 height) (* 0.8 width) (* 0.8 height)) - (image-stroke-selection! image) - ; (image-select-ellipse! image REPLACE - ; (* 0.2 width) (* 0.2 height) (* 0.6 width) (* 0.6 height)) - ;(context-set-fgcolor! "gold") - ;(image-stroke-selection! image) - (image-select-ellipse! image REPLACE - (* 0.11 width) (* 0.11 height) (* 0.78 width) (* 0.78 height)) - ;(context-set-fgcolor! "goldenrod") - (image-stroke-selection! image) - (image-select-ellipse! image REPLACE - (* 0.12 width) (* 0.12 height) (* 0.76 width) (* 0.76 height)) - - (image-stroke-selection! image) - (image-select-ellipse! image REPLACE - (* 0.13 width) (* 0.13 height) (* 0.74 width) (* 0.74 height)) - (image-stroke-selection! image) - (image-select-ellipse! image REPLACE - (* 0.14 width) (* 0.14 height) (* 0.72 width) (* 0.72 height)) - (image-stroke-selection! image) - (image-select-ellipse! image REPLACE - (* 0.15 width) (* 0.15 height) (* 0.7 width) (* 0.7 height)) - (image-stroke-selection! image) - (context-set-brush! "Nova") - ; (context-set-fgcolor! (irgb 0 170 100)) - (draw-central-circles image tnum (* 0.4 width) (* 0.4 height) - (* 0.6 width) (* 0.6 height)) - ; (context-set-fgcolor! (irgb 0 170 100)) - (for-each draw-pos-triangle (make-list snum image) (map (l-s * width) (map (r-s / 10) (iota snum))) - (map (l-s * height) (map (r-s / 10) (iota snum)))) - (for-each draw-neg-triangle (make-list fnum image) (map (l-s * width) (map (r-s / 10) (iota fnum))) - (map (l-s * height) (map (r-s / 10) (iota fnum)))) - - (draw-pos-triangle image (* 0.9 width) (* 0.9 height)) - (draw-neg-triangle image (* 0.9 width) (* 0.9 height)) - (draw-central-circles image tnum (* 0.45 width) 0 (* 0.55 width) (* 0.1 height)) - (draw-central-circles image tnum (* 0.85 width) (* 0.68 height)(* 0.95 width) (* 0.78 height)) - (draw-central-circles image tnum (* 0.05 width) (* 0.68 height)(* 0.15 width) (* 0.78 height)) - (image-refresh-display! image) - (image-show image) - ) - - - ) - ) - diff --git a/magic circle3 b/magic circle3.rkt similarity index 99% rename from magic circle3 rename to magic circle3.rkt index fe312f3..c78d2c9 100644 --- a/magic circle3 +++ b/magic circle3.rkt @@ -207,7 +207,7 @@ )) -(define draw-magic-circle12 +(define draw-magic-circle3 (lambda (num width height) (let* ([nums (split-num num)] [fnum (car nums)] diff --git a/magic circle4 example1.jpg b/magic circle4 example1.jpg new file mode 100644 index 0000000..04b0f7b Binary files /dev/null and b/magic circle4 example1.jpg differ diff --git a/magic circle4 b/magic circle4.rkt similarity index 99% rename from magic circle4 rename to magic circle4.rkt index dfaeaef..b6b8c3f 100644 --- a/magic circle4 +++ b/magic circle4.rkt @@ -127,6 +127,7 @@ (define star-row1 (25-num)) (define star-col2 (25-num)) (define star-row2 (25-num)) + (define draw-central-circles (lambda (image circle-num left top right bottom) (let* ([x-dis (/ (- right left) circle-num 2)] @@ -174,7 +175,7 @@ )) -(define world (image-new 200 200)) + (define draw-pentagon (lambda (image start-col start-row R ratio draw-or-not start-angle) diff --git a/magic circle4.rkt~ b/magic circle4.rkt~ new file mode 100644 index 0000000..04a8428 --- /dev/null +++ b/magic circle4.rkt~ @@ -0,0 +1,415 @@ +#lang racket +(require gigls/unsafe) + + +(define split-num + (lambda (num) + (list (quotient num 100) + (remainder (quotient num 10) 10) + (remainder num 10)) + ) + ) + + +(define draw-bg + (lambda (image color) + (let* ([bgcolor (irgb (- (irgb-red color) 50) + (- (irgb-green color) 50) + (- (irgb-blue color) 50))] + [bgcolor2 (irgb (- (irgb-red color) 240) + (- (irgb-green color) 240) + (- (irgb-blue color) 240))] + [icolor (irgb-complement bgcolor)] + [innercolor (irgb (- (irgb-red icolor) 50) + (- (irgb-green icolor) 50) + (- (irgb-blue icolor) 50))] + [center-col (/ (image-width image) 2)] + [center-row (/ (image-height image) 2)] + [h-axis (/ (image-width image) 5)] + [v-axis (/ (image-width image) 10)] + [a h-axis] + [b v-axis] + [r1 (lambda (x y) (floor (/ (* 1.1 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 1.1 a) (* 1.1 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + [r2 (lambda (x y) (floor (/ (* 2 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 2 a) (* 2 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + [r3 (lambda (x y) (floor (/ (* 0.9 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 0.9 a) (* 0.9 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + + [bg (image-compute + (lambda (x y) + (cond + [(and (> (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) + (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (* (irgb-red bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) + (* (irgb-green bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) + (* (irgb-blue bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3)))))) + + ] + [(and (> (+ (/ (sqr(- x center-col)) (sqr h-axis)) + (/ (sqr(- y center-row)) (sqr v-axis))) 1) + (<= (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) + (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (- (irgb-red bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-red bgcolor))) + (- (irgb-green bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-green bgcolor))) + (- (irgb-blue bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-blue bgcolor)))) + + ] + [(and (<= (+ (/ (sqr(- x center-col)) (sqr h-axis)) + (/ (sqr(- y center-row)) (sqr v-axis))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (+ (irgb-red innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-red bgcolor) (irgb-red innercolor)))) + (+ (irgb-green innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-green bgcolor) (irgb-green innercolor)))) + (+ (irgb-blue innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-blue bgcolor) (irgb-blue innercolor))))) + + ] + [else innercolor] + + )) + (image-width image) (image-height image) + )] + + ) + (image-copy-paste-block! bg 0 0 image 0 0 (image-width image) (image-height image)) + ) + + )) + + +(define 25-num + (lambda () + (let kernel ([list-so-far '()] + [n 25]) + (cond [(< n 1) + list-so-far] + [else (kernel (cons (random 25) list-so-far) + (- n 1))]) + + )) + ) + +(define star-col1 (25-num)) +(define star-row1 (25-num)) +(define star-col2 (25-num)) +(define star-row2 (25-num)) +(define draw-central-circles + (lambda (image circle-num left top right bottom) + (let* ([x-dis (/ (- right left) circle-num 2)] + [y-dis (/ (- bottom top) circle-num 2)] + [lefts (map (l-s + left) (map (l-s * x-dis) (iota circle-num)))] + [tops (map (l-s + top) (map (l-s * y-dis) (iota circle-num)))] + [widths (map (l-s - (- right left)) (map (l-s * (* x-dis 2)) (iota circle-num)))] + [heights (map (l-s - (- bottom top)) (map (l-s * (* y-dis 2)) (iota circle-num)))] + [draw-one-circle! (lambda (l t width height) + (image-select-ellipse! image REPLACE + l t width height) + (image-stroke-selection! image) + (image-select-nothing! image) + )]) + (for-each draw-one-circle! lefts tops widths heights) + ) + + ) + + ) + + +(define generate-color + (lambda (num) + (cond [(= num 0) + (irgb 255 255 255)] + [(= num 1) + (irgb 255 150 150)] + [(= num 2) + (irgb 200 200 255)] + [(= num 3) + (irgb 200 255 200)] + [(= num 4) + (irgb 230 200 255)] + [(= num 5) + (irgb 255 255 200)] + [(= num 6) + (irgb 255 192 203)] + [(= num 7) + (irgb 200 255 255)] + [(= num 8) + (irgb 192 203 255)] + [(= num 9) + (irgb 192 255 203)]) + + )) + +(define world (image-new 200 200)) + +(define draw-pentagon + (lambda (image start-col start-row R ratio draw-or-not start-angle) + (let* ([in (/ (* 2 pi) 5)] + [create-col-point (map (lambda (n)(+ start-col (* R (cos (+ start-angle (* n in)))))) (iota 5))] + [create-row-point (map (lambda (n)(- start-row (* R (sin (+ start-angle (* n in)))))) (iota 5))] + [variant-col (lambda (n) (+ (* start-col (- 1 ratio)) (* n ratio)))] + [create-point (lambda (n) + (cons (+ start-col (* R (cos (+ start-angle (* n in))))) + (- start-row (* R (sin (+ start-angle (* n in)))))))] + [create-points (map create-point (iota 5))] + [my-col-point (map variant-col create-col-point)] + [my-points (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i 5) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (cons (+ (* start-col (- 1 ratio)) (* (car (list-ref create-points i)) ratio)) + (cdr (list-ref create-points i))) + cur-points + ))]))]) + (cond [(equal? draw-or-not #t) + (image-select-polygon! image REPLACE my-points) + (image-stroke-selection! image) + (image-select-nothing! image)] + [else (list my-col-point create-row-point)])))) + + + +(define roman-num + (lambda (image h k R ratio num) + (let* ([urow (- k (/ R 1.5))] + [lrow (+ k (/ R 1.5))] + [cols (map (l-s + h) (map (r-s * (/ (* R 0.8) 3)) (map (r-s - 3)(iota 7))))] + [my-cols (map (l-s + (* h (- 1 ratio))) (map (l-s * ratio) cols))]) + (cond [(= num 0) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 5) + lrow) + (image-draw-line! image (list-ref my-cols 1) + lrow + (list-ref my-cols 5) + urow)] + [(= num 1) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow)] + [(= num 2) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow)] + [(= num 3) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 4) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 3) + lrow)] + [(= num 5) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 3) + lrow)] + [(= num 6) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow)] + [(= num 7) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 8) + (image-draw-line! image (list-ref my-cols 0) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 9) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 5) + lrow) + (image-draw-line! image (list-ref my-cols 3) + lrow + (list-ref my-cols 5) + urow)]) + + ) + )) + + +(define draw-magic-circle4 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [HR (* 0.8 width)] + [VR (* 0.8 height)] + [ratio (/ width height)] + [c-col (/ width 2)] + [c-row (/ height 2)] + [fgcolor (generate-color fnum)] + [in* (/ (* (+ fnum 1) pi) (+ fnum 3))] + [inner-pentagon-col (car (draw-pentagon image c-col c-row (/ (* (* 0.4 width) (sin (*(/ 54 180) pi))) 2) ratio #f (/ pi 3)))] + [inner-pentagon-row (cadr (draw-pentagon image c-col c-row (/ (* (* 0.4 width) (sin (*(/ 54 180) pi))) 2) ratio #f (/ pi 3)))] + [outer-pentagon-col (car (draw-pentagon image c-col c-row (* 0.4 width) ratio #f (/ pi 2)))] + [outer-pentagon-row (cadr (draw-pentagon image c-col c-row (* 0.4 width) ratio #f (/ pi 2)))] + ) + + (draw-bg image fgcolor) + + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + (context-set-fgcolor! "black") + (context-set-brush! "2. Block 01") + + (context-set-fgcolor! fgcolor) + + + (context-set-brush! "Nova") + (image-select-ellipse! image REPLACE (* 0.1 width) (* 0.1 height) HR VR) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "Nova") + (draw-pentagon image c-col c-row (* 0.4 width) ratio #t (/ pi 2)) + (draw-pentagon image c-col c-row (* (* 0.4 width) (sin (*(/ 54 180) pi))) ratio #t (/ (* 3 pi) 2)) + (for-each image-draw-line! (make-list 5 image) + inner-pentagon-col inner-pentagon-row + (append (list (list-ref outer-pentagon-col 3) (list-ref outer-pentagon-col 4)) (list-take outer-pentagon-col 3)) + (append (list (list-ref outer-pentagon-row 3) (list-ref outer-pentagon-row 4))(list-take outer-pentagon-row 3))) + (for-each draw-central-circles (make-list 5 image) (make-list 5 2) + (map (r-s - (* width 0.03)) inner-pentagon-col) + (map (r-s - (* height 0.03)) inner-pentagon-row) + (map (r-s + (* width 0.03)) inner-pentagon-col) + (map (r-s + (* height 0.03))inner-pentagon-row)) + (for-each draw-central-circles (make-list 5 image) (make-list 5 fnum) + (map (r-s - (* width 0.05)) outer-pentagon-col) + (map (r-s - (* height 0.05)) outer-pentagon-row) + (map (r-s + (* width 0.05)) outer-pentagon-col) + (map (r-s + (* height 0.05)) outer-pentagon-row)) + + (draw-central-circles image tnum (- c-col (* 0.1 width)) + (- c-row (* 0.1 height)) + (+ c-col (* 0.1 width)) + (+ c-row (* 0.1 height))) + (roman-num image (* 0.5 width) (* 0.9 height) (* 0.03 (+ width height)) ratio snum) + (image-refresh-display! image) + (image-show image) + ) + )) \ No newline at end of file diff --git a/magic1sample1.jpg b/magic1sample.jpg similarity index 100% rename from magic1sample1.jpg rename to magic1sample.jpg diff --git a/magic2sample1.jpg b/magic2sample.jpg similarity index 100% rename from magic2sample1.jpg rename to magic2sample.jpg diff --git a/magic3sample2.jpg b/magic3sample.jpg similarity index 100% rename from magic3sample2.jpg rename to magic3sample.jpg diff --git a/magic3sample1.jpg b/magic3sample1.jpg deleted file mode 100644 index a6bb4bb..0000000 Binary files a/magic3sample1.jpg and /dev/null differ diff --git a/magic circle2 example1.jpg b/magic4sample.jpg similarity index 100% rename from magic circle2 example1.jpg rename to magic4sample.jpg diff --git a/magic4sample1.jpg b/magic4sample1.jpg deleted file mode 100644 index f3f4e08..0000000 Binary files a/magic4sample1.jpg and /dev/null differ diff --git a/magic5sample1.jpg b/magic5sample1.jpg index 0602634..5eb6747 100644 Binary files a/magic5sample1.jpg and b/magic5sample1.jpg differ diff --git a/magic5sample2.jpg b/magic5sample2.jpg index e439d7b..6457739 100644 Binary files a/magic5sample2.jpg and b/magic5sample2.jpg differ diff --git a/magic5sample3.jpg b/magic5sample3.jpg index 6679f67..f50e86d 100644 Binary files a/magic5sample3.jpg and b/magic5sample3.jpg differ diff --git a/maigc circle4 example2.jpg b/maigc circle4 example2.jpg new file mode 100644 index 0000000..d0b8caa Binary files /dev/null and b/maigc circle4 example2.jpg differ diff --git a/merged.rkt~ b/merged.rkt~ new file mode 100644 index 0000000..6f1f7b4 --- /dev/null +++ b/merged.rkt~ @@ -0,0 +1 @@ +#lang racket diff --git a/project(albert+shuyi).rkt b/project(albert+shuyi).rkt new file mode 100644 index 0000000..5247997 --- /dev/null +++ b/project(albert+shuyi).rkt @@ -0,0 +1,512 @@ +#lang racket +(require gigls/unsafe) + +;http://stackoverflow.com/questions/13562200/find-the-index-of-element-in-list +;;; Procedure: +;;; get-list-index +;;; Parameters: +;;; l, a list +;;; el, a list element +;;; Purpose: +;;; Get the index of the element el in the list l +;;; Produces: +;;; index, an integer +;;; Preconditions: +;;; [No additional] +;;; Postconditions: +;;; If el is in the list l, index is the index of the first occurence of el in l +;;; Otherwise, index is -1 +(define (get-list-index l el) + (if (null? l) + -1 + (if (= (car l) el) + 0 + (let ((result (get-list-index (cdr l) el))) + (if (= result -1) + -1 + (+ 1 result)))))) + +(random-seed 0) + +(define size 32) + +;;; Procedure: +;;; pos->ref +;;; Parameters: +;;; pos, a pair +;;; Purpose: +;;; Convert a position into a reference +;;; Produces: +;;; ref, an integer +;;; Preconditions: +;;; pos is a pair of two integers, both in the range [0, size) +;;; Postconditions: +;;; pos = (x . y) +;;; ref = size * x + y +(define pos->ref + (lambda (pos) + (+ (* size (car pos)) (cdr pos)))) + +;;; Procedure: +;;; ref->pos +;;; Parameters: +;;; ref, an integer +;;; Purpose: +;;; Convert a reference into a position +;;; Produces: +;;; pos, a pair +;;; Preconditions: +;;; ref is in the range [0, size * size) +;;; Postconditions: +;;; ref / size = x + y / size (mixed number) +;;; pos = (x . y) +(define ref->pos + (lambda (ref) + (cons (quotient ref size) (remainder ref size)))) + +(define visited (make-vector (* size size) #f)) + +;;; Procedure: +;;; visited? +;;; Parameters: +;;; pos, a pair +;;; Purpose: +;;; Find whether a position has been visited by the maze generation algorithm +;;; Produces: +;;; visited, a boolean +;;; Preconditions: +;;; pos is a pair of two integers, both in the range [0, size) +;;; Postconditions: +;;; return whether pos has been visited +(define visited? + (lambda (pos) + (vector-ref visited (pos->ref pos)))) + +;;; Procedure: +;;; visit! +;;; Parameters: +;;; pos, a pair +;;; Purpose: +;;; Visit a position during maze generation +;;; Produces: +;;; void +;;; Preconditions: +;;; pos is a pair of two integers, both in the range [0, size) +;;; Postconditions: +;;; (visited? pos) will return true +(define visit! + (lambda (pos) + (vector-set! visited (pos->ref pos) #t))) + +;;; Procedure: +;;; in-maze? +;;; Parameters: +;;; pos, a pair +;;; Purpose: +;;; Find whether a position is in the maze bounds +;;; Produces: +;;; in-maze, a boolean +;;; Preconditions: +;;; pos is a pair of two integers, both in the range [0, size) +;;; Postconditions: +;;; if pos is in the maze bounds, return true +;;; otherwise, return false +(define in-maze? + (lambda (pos) + (and + (>= (car pos) 0) + (>= (cdr pos) 0) + (< (car pos) size) + (< (cdr pos) size)))) + +; cite filter from racket docs? + +;;; Procedure: +;;; neighbors +;;; Parameters: +;;; pos, a pair +;;; Purpose: +;;; Find the neighboring positions of a position +;;; Produces: +;;; poss, a list +;;; Preconditions: +;;; pos is a pair of two integers, both in the range [0, size) +;;; Postconditions: +;;; poss is a list of all positions that are in the maze and a distance of 1 away from pos +(define neighbors + (lambda (pos) + (let ([north (cons (- (car pos) 1) (cdr pos))] + [south (cons (+ (car pos) 1) (cdr pos))] + [east (cons (car pos) (- (cdr pos) 1))] + [west (cons (car pos) (+ (cdr pos) 1))]) + (filter in-maze? (list north south east west))))) + +;;; Procedure: +;;; build-maze! +;;; Parameters: +;;; pos +;;; Purpose: +;;; Generate a maze by building a tree of nodes +;;; Produces: +;;; maze-node, a pair +;;; Preconditions: +;;; pos is a pair of two integers, both in the range [0, size) +;;; Postconditions: +;;; maze-node is a pair in which the first element is the position +;;; and the second element is a list of children from that position. +;;; maze-node makes a tree. + +(define build-maze! + (lambda (pos) + (when (not (visited? pos)) + (visit! pos) + (cons pos (map build-maze! (shuffle (neighbors pos))))))) + +; unit square with top left corner at origin +(define tile (hshift-drawing 0.5 (vshift-drawing 0.5 drawing-unit-square))) +(define vpath (vscale-drawing 1.9 (hscale-drawing 0.9 tile))) +(define hpath (hscale-drawing 1.9 (vscale-drawing 0.9 tile))) + +;;; Procedure: +;;; drawing-path +;;; Parameters: +;;; prev, a pair +;;; next, a pair +;;; Purpose: +;;; To draw a rectangle between two positions +;;; Produces: +;;; result, a drawing +;;; Preconditions: +;;; prev and next are pairs of two integers, both in the range [0, size) +;;; prev and next represent adjacent positions +;;; Postconditions: +;;; Result will be a rectangle with its left-top point at +;;; the left-most and top-most position between the positions represented +;;; by prev and next. +(define drawing-path + (lambda (prev next) + ;(display (list prev next)) + ;(newline) + (if (= (car prev) (car next)) + ; vertical + (hshift-drawing + (car prev) + (vshift-drawing + (min (cdr prev) (cdr next)) + vpath)) + ; horizontal + (vshift-drawing + (cdr prev) + (hshift-drawing + (min (car prev) (car next)) + hpath))))) + +;;; Procedure: +;;; drawing-maze +;;; Parameters: +;;; maze, a pair +;;; Purpose: +;;; result, a drawing +;;; Produces: +;;; maze-drawing, a drawing +;;; Preconditions: +;;; maze is a valid node in the maze tree +;;; Postconditions: +;;; maze-drawing will contain a series of rectangles on each path +;;; the player can go to. +(define drawing-maze + (lambda (maze) + (let ([children (filter (o not void?) (cdr maze))]) + (drawing-compose (append + (list drawing-blank) + (map (o (l-s drawing-path (car maze)) car) children) + (map drawing-maze children)))))) + +(define maze (build-maze! (cons 0 0))) + +(define img-nums (cons 0 (shuffle (cdr (iota (* size size)))))) + +(define drawing-player (recolor-drawing (irgb 254 254 254) (scale-drawing 0.8 (hshift-drawing 0.5 (vshift-drawing 0.5 drawing-unit-circle))))) + +;;; Procedure: +;;; draw-player! +;;; Parameters: +;;; image, an image +;;; hscale, an integer +;;; vscale, an integer +;;; img-num, an integer +;;; Purpose: +;;; To draw a circle on a certain position in the image +;;; Produces: +;;; Result, an image +;;; Preconditions: +;;; img-num should be an integer between 0 and 1023 +;;; Postconditions: +;;; Result will be a white circle on image whose position on image depends +;;; randomly on img-num +(define draw-player! + (lambda (image hscale vscale img-num) + (drawing-render! (hscale-drawing hscale (vscale-drawing vscale (hshift-drawing (+ 1 (car (ref->pos img-num))) (vshift-drawing (+ 1 (cdr (ref->pos img-num))) drawing-player)))) image))) + +;;; Procedure: +;;; distance-from-start +;;; Parameters: +;;; img-num, an integer +;;; Purpose: +;;; To calculate the distance between a point and the left-top point +;;; on the drawing +;;; Produces: +;;; distance, a non-negative number +;;; Preconditions: +;;; img-num should be an integer between 0 and 1023 +;;; Postconditions: +;;; distance describes how far a point, represented by img-num, is from +;;; the start of the maze. The farther it is from the start, the bigger distance is. +;;; Distance should be greater than 0 smaller than 32*(sqrt 2) +(define distance-from-start + (lambda (img-num) + (sqrt (+ (expt (car (ref->pos img-num)) 2) (expt (cdr (ref->pos img-num)) 2))))) + +;;; Procedure: +;;; find-bg-color +;;; Parameters: +;;; distance, a number +;;; Purpose: +;;; To decide on the color of the background of the image +;;; when the player is at a certain point +;;; Produces: +;;; bgcolor, an hsv color +;;; Preconditions: +;;; Distance is a non-negative number between 0 and 32*(sqrt 2) +;;; Postconditions: +;;; bgcolor covers a range of color on 1/3 of a color wheel from red to yellow to green. +(define find-bg-color + (lambda (distance) + (hsv->rgb (hsv (* 120 (/ distance size (sqrt 2))) 1 0.8)))) + +;;; Procedure: +;;; image-series +;;; Parameters: +;;; n, an integer +;;; width, an integer +;;; height, an integer +;;; Purpose: +;;; To generate an image of a maze with player in the proper position corresponding +;;; to n, with the proper combination of numbers on sides of the image and the proper +;;; background color. +;;; Produces: +;;; image, an image +;;; Preconditions: +;;; n >= 0 +;;; width > 0 +;;; height > 0 +;;; Postconditions: +;;; image is an image with a maze, a circle and numbers on sides. More information can be found in +;;; design statement of the final statement. +(define image-series + (lambda (n width height) + (let* ([hscale (max 1.25 (floor (/ width (+ size 2))))] + [vscale (max 1.25 (floor (/ height (+ size 2))))] + [image (drawing->image (hscale-drawing hscale (vscale-drawing vscale (vshift-drawing 1 (hshift-drawing 1 (drawing-maze maze))))) width height)] + [unscrambled (get-list-index img-nums n)] + [bgcolor (find-bg-color (distance-from-start unscrambled))] + [draw-gradient + (lambda (color) + (if (= color (irgb 255 255 255)) + bgcolor + color))]) + (cond [(= unscrambled (- (* size size) 1)) + (draw-smiling-face width height)] + [(draw-player! image hscale vscale unscrambled) + (context-set-brush! "2. Hardness 100" 0.17) + (context-set-fgcolor! "black") + (draw-nums image (car (ref->pos unscrambled)) (cdr (ref->pos unscrambled)) hscale vscale) + (image-variant image draw-gradient)])))) + +;;; Procedure: +;;; draw-smiling-face +;;; Parameters: +;;; width, a positive number +;;; height, a positive number +;;; Purpose: +;;; To draw a smiling face +;;; Produces: +;;; image, an image +;;; Preconditions: +;;; No additional +;;; Postconditions: +;;; image will be an image of width width and height height. There will be +;;; a yellow smiley face with two blue eyes and a red smiley mouth on image. +(define draw-smiling-face + (lambda (width height) + (define canvas (image-new width height)) + (image-select-ellipse! canvas REPLACE (/ width 8) (/ height 8) (* width 0.75) (* height 0.75)) + (context-set-fgcolor! "yellow") + (image-fill-selection! canvas) + (image-select-ellipse! canvas REPLACE (* width 0.375) (/ height 2) (/ width 4) (/ height 4)) + (image-select-ellipse! canvas SUBTRACT (/ width 10) (* height 0.175) (* 0.8 width) (* 0.4 height)) + (context-set-fgcolor! "red") + (image-fill-selection! canvas) + (image-select-ellipse! canvas REPLACE (* 0.325 width) (* 0.35 height) (/ width 10) (/ height 10)) + (context-set-fgcolor! "blue") + (image-fill-selection! canvas) + (image-select-ellipse! canvas REPLACE (* 0.575 width) (* 0.35 height) (/ width 10) (/ height 10)) + (context-set-fgcolor! "blue") + (image-fill-selection! canvas))) + +;;; Procedure: +;;; number->image +;;; Parameters: +;;; num, a non-negative integer +;;; x, a number +;;; y, a number +;;; image, an image +;;; hsize, a number +;;; vsize, a number +;;; space, a number +;;; horizontal, a boolean value +;;; Purpose: +;;; To draw numbers on an image +;;; Produces: +;;; new-image, an image +;;; Preconditions: +;;; x, y, hsize, vsize, space should be within the width and height of image +;;; Postconditions: +;;; The procedure will produce an image with numbers drawn on it representing +;;; the num that we input. The drawn numbers will be vsize in height and hsize +;;; in width, with a distance of space between each other. The numbers' first digit will +;;; start with its left-top point on (x, y). +(define number->image + (lambda (num x y image hsize vsize space horizontal) + (cond [(= num 1) + (image-draw-line! image (+ x 4) y (+ 4 x) (+ y vsize vsize))] + [(= num 2) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image (+ x hsize) y (+ x hsize) (+ y vsize)) + (image-draw-line! image (+ x hsize) (+ y vsize) x (+ y vsize)) + (image-draw-line! image x (+ y vsize) x (+ y vsize vsize)) + (image-draw-line! image x (+ y vsize vsize) (+ x hsize) (+ y vsize vsize))] + [(= num 3) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image (+ x hsize) (+ y vsize) x (+ y vsize)) + (image-draw-line! image (+ x hsize) y (+ x hsize) (+ y vsize vsize)) + (image-draw-line! image x (+ y vsize vsize) (+ x hsize) (+ y vsize vsize))] + [(= num 4) + (image-draw-line! image x y x (+ y vsize)) + (image-draw-line! image x (+ y vsize) (+ x hsize) (+ y vsize)) + (image-draw-line! image (+ x hsize) y (+ x hsize) (+ y vsize vsize))] + [(= num 5) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image x y x (+ y vsize)) + (image-draw-line! image x (+ y vsize) (+ x hsize) (+ y vsize)) + (image-draw-line! image (+ x hsize) (+ y vsize) (+ x hsize) (+ y vsize vsize)) + (image-draw-line! image x (+ y vsize vsize) (+ x hsize) (+ y vsize vsize))] + [(= num 6) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image x y x (+ y vsize vsize)) + (image-draw-line! image x (+ y vsize) (+ x hsize) (+ y vsize)) + (image-draw-line! image (+ x hsize) (+ y vsize) (+ x hsize) (+ y vsize vsize)) + (image-draw-line! image x (+ y vsize vsize) (+ x hsize) (+ y vsize vsize))] + [(= num 7) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image (+ x hsize) y (+ x hsize) (+ y vsize vsize))] + [(= num 8) + (image-draw-line! image x y x (+ y vsize vsize)) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image (+ x hsize) y (+ x hsize) (+ y vsize vsize)) + (image-draw-line! image x (+ y vsize) (+ x hsize) (+ y vsize)) + (image-draw-line! image x (+ y vsize vsize) (+ x hsize) (+ y vsize vsize))] + [(= num 9) + (image-draw-line! image x y x (+ y vsize)) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image (+ x hsize) y (+ x hsize) (+ y vsize vsize)) + (image-draw-line! image x (+ y vsize) (+ x hsize) (+ y vsize)) + (image-draw-line! image x (+ y vsize vsize) (+ x hsize) (+ y vsize vsize))] + [(= num 0) + (image-draw-line! image x y x (+ y vsize vsize)) + (image-draw-line! image x y (+ x hsize) y) + (image-draw-line! image x (+ y vsize vsize) (+ x hsize) (+ y vsize vsize)) + (image-draw-line! image (+ x hsize) y (+ x hsize) (+ y vsize vsize)) + (image-draw-line! image x y (+ x hsize) (+ y vsize vsize))] + [else + (number->image (remainder num 10) x y image hsize vsize space horizontal) + (if horizontal + (number->image (quotient num 10) (- x space hsize) y image hsize vsize space horizontal) + (number->image (quotient num 10) x (- y space vsize) image hsize vsize space horizontal))]))) +; (map (l-s list-ref img-nums) (map pos-ref (neighbors (ref-pos num))))) + + +;;; Procedure: +;;; draw-nums +;;; Parameters: +;;; image, an image +;;; posx, an integer +;;; posy, an integer +;;; hscale, a positive number +;;; vscale, a positive number +;;; Purpose: +;;; To draw the numbers on the image after deciding on which number(s) to draw +;;; and on which side of the image to draw each of them +;;; Produces: +;;; image, a revised image +;;; Preconditions: +;;; 0<= posx< 32 +;;; 0<= posy< 32 +;;; Postconditions: +;;; result will be an image with numbers drawn on the side to which the player +;;; is able to go. +(define draw-nums + (lambda (image posx posy hscale vscale) + (let ([x (* hscale (+ 1 posx))] + [y (* vscale (+ 1 posy))]) + (when ;East + (equal? (irgb 0 0 0) (image-get-pixel image (- (+ x hscale) 1) y)) + (number->image + (list-ref img-nums (pos->ref (cons (+ 1 posx) posy))) + (* hscale (+ 1 size)) + (+ 4 (/ (* vscale size) 2)) + image + (/ hscale 2) + (/ vscale 2) + hscale + #f)) + (when;West + (equal? (irgb 0 0 0) (image-get-pixel image (- x 1) y)) + (number->image + (list-ref img-nums (pos->ref (cons (- posx 1) posy))) + 4 + (+ 1 (/ (* vscale size) 2)) + image + (/ hscale 2) + (/ vscale 2) + hscale + #f)) + (when;North + (equal? (irgb 0 0 0) (image-get-pixel image x (- y 1))) + (number->image + (list-ref img-nums (pos->ref (cons posx (- posy 1)))) + (+ 1 (/ (* hscale size) 2)) + 4 + image + (/ hscale 2.5) + (/ vscale 2.5) + (/ hscale 2) + #t)) + (when;South + (equal? (irgb 0 0 0) (image-get-pixel image x (- (+ y vscale) 1))) + (number->image + (list-ref img-nums (pos->ref (cons posx (+ 1 posy)))) + (+ 1 (/ (* hscale size) 2)) + (* vscale (+ 1 size)) + image + (/ hscale 2.5) + (/ vscale 2.5) + (/ hscale 2) + #t))))) + + + + + + + diff --git a/project.rkt b/project.rkt new file mode 100644 index 0000000..804ab97 --- /dev/null +++ b/project.rkt @@ -0,0 +1,1414 @@ +#lang racket + +(require gigls/unsafe) + +;;;Procedure:game +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: apply the game mechinism to the whole procedure +;;;Produce: nothing +(define game + (lambda (x width height) + (cond [(= x 0) + (draw-magic-circle1 311 width height)] + [(or (= x 311) + (= x 324) + (= x 339) + (= x 356) + (= x 375) + (= x 396) + (= x 419) + (= x 444) + (= x 471)) + (draw-magic-circle1 (+ 275 (sqr (+ 5 (+ 1 (- (sqrt (- x 275)) 5))))) width height)] + + [(= x 500) + (draw-magic-circle2 28 width height)] + + [(or (= x 28) + (= x 66) + (= x 114) + (= x 172) + (= x 240) + (= x 318) + (= x 406) + (= x 504) + (= x 612)) + (draw-magic-circle2 (round (* 5 (- (sqr (+ 2.3 (+ 1 (- (sqrt (+ (/ x 5) 5.29)) 2.3)))) 5.29))) width height)] + + [(= x 730) + (draw-magic-circle3 841 width height)] + + [(= x 841) + (draw-magic-circle3 909 width height)] + [(= x 909) + (draw-magic-circle3 141 width height)] + [(= x 141) + (draw-magic-circle3 756 width height)] + [(= x 756) + (draw-magic-circle3 958 width height)] + [(= x 958) + (draw-magic-circle3 279 width height)] + [(= x 279) + (draw-magic-circle3 656 width height)] + [(= x 656) + (draw-magic-circle3 989 width height)] + [(= x 989) + (draw-magic-circle3 412 width height)] + [(= x 412) + (draw-magic-circle3 544 width height)] + + + [(= x 544) + (draw-magic-circle4 17 width height)] + + [(or (= x 17) + (= x 53) + (= x 104) + (= x 169) + (= x 247) + (= x 337) + (= x 438) + (= x 549) + (= x 670)) + (draw-magic-circle4 (floor (+ 1 (* 16 (expt (+ 1 (expt (/ (- x 1) 16) (/ 1 1.7))) 1.7)))) width height)] + + [(= x 801) + (draw-magic-circle5 540 width height)] + + + [(= x 540) + (draw-magic-circle5 416 width height)] + [(= x 416) + (draw-magic-circle5 979 width height)] + [(= x 979) + (draw-magic-circle5 653 width height)] + [(= x 653) + (draw-magic-circle5 283 width height)] + [(= x 283) + (draw-magic-circle5 960 width height)] + [(= x 960) + (draw-magic-circle5 753 width height)] + [(= x 753) + (draw-magic-circle5 145 width height)] + [(= x 145) + (draw-magic-circle5 911 width height)] + [(= x 911) + (draw-magic-circle5 839 width height)] + + [(= x 839) + (define source (image-load "/home/chenziwe/Desktop/project/titus.jpg")) + (define target (image-new width height)) + (image-copy-paste-block! + source 0 0 + target 0 0 width height) + (image-show target)] + + + [else (draw-tree x width height)] + ) + + + )) + +;;;;;;;;;;;;;;;;;;;general procedures;;;;;;;;;;;;;;;;;; + +;;;Procedure:split-num +;;;Parameter:num, a three digits number +;;;Purpose:creat a list of 3 numbers, +;;; first is the hundreds digit, next is the tens digit, the last is the unit digit +;;;Produce:splited-num, a list +(define split-num + (lambda (num) + (list (quotient num 100) + (remainder (quotient num 10) 10) + (remainder num 10)))) + +;;;Procedure:draw-bg +;;;Parameter:image, an image +;;; color, an rgb encoded color +;;;Purpose:draw the background of the image, a halo at the center of the image +;;;Produce:drawed-bg, an image with a halo at its center +;;; the inner color is the complement of color inputed with each rgb component substracted by 50 +;;; the outer color is the color inputed with each rgb component substracted by 50 +;;; the outmost strok is the inputed with each rgb component substracted by 240(black if all rgb components is smaller than 240) +(define draw-bg + (lambda (image color) + (let* ([bgcolor (irgb (- (irgb-red color) 50) + (- (irgb-green color) 50) + (- (irgb-blue color) 50))] + [bgcolor2 (irgb (- (irgb-red color) 240) + (- (irgb-green color) 240) + (- (irgb-blue color) 240))] + [icolor (irgb-complement bgcolor)] + [innercolor (irgb (- (irgb-red icolor) 50) + (- (irgb-green icolor) 50) + (- (irgb-blue icolor) 50))] + [center-col (/ (image-width image) 2)] + [center-row (/ (image-height image) 2)] + [h-axis (/ (image-width image) 5)] + [v-axis (/ (image-width image) 10)] + [a h-axis] + [b v-axis] + [r1 (lambda (x y) (floor (/ (* 1.1 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 1.1 a) (* 1.1 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + [r2 (lambda (x y) (floor (/ (* 2 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 2 a) (* 2 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + [r3 (lambda (x y) (floor (/ (* 0.9 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 0.9 a) (* 0.9 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + + [bg (image-compute + (lambda (x y) + (cond + [(and (> (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) + (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (* (irgb-red bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) + (* (irgb-green bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) + (* (irgb-blue bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))))] + [(and (> (+ (/ (sqr(- x center-col)) (sqr h-axis)) + (/ (sqr(- y center-row)) (sqr v-axis))) 1) + (<= (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) + (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (- (irgb-red bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-red bgcolor))) + (- (irgb-green bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-green bgcolor))) + (- (irgb-blue bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-blue bgcolor))))] + [(and (<= (+ (/ (sqr(- x center-col)) (sqr h-axis)) + (/ (sqr(- y center-row)) (sqr v-axis))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (+ (irgb-red innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-red bgcolor) (irgb-red innercolor)))) + (+ (irgb-green innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-green bgcolor) (irgb-green innercolor)))) + (+ (irgb-blue innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-blue bgcolor) (irgb-blue innercolor)))))] + [else innercolor])) + (image-width image) (image-height image))]) + (image-copy-paste-block! bg 0 0 image 0 0 (image-width image) (image-height image))))) + + +;;;Procedure:generate-color +;;;Parameter:num, an integer between 0~9 +;;;Purpose:creat return an rgb encoded color depending on ten conditions(input 0~9) +;;; with name of "white" "lightsalmon" "lightblue" "gainsboro" "lavender" "lemonchiffon" "pink" "lightcyan" "lightblue" "paleturquoise",respectively +;;;Produce:generated-colors, an rgb encoded color +(define generate-color + (lambda (num) + (cond [(= num 0) + (irgb 255 255 255)] + [(= num 1) + (irgb 255 150 150)] + [(= num 2) + (irgb 200 200 255)] + [(= num 3) + (irgb 200 255 200)] + [(= num 4) + (irgb 255 200 255)] + [(= num 5) + (irgb 255 255 200)] + [(= num 6) + (irgb 255 192 203)] + [(= num 7) + (irgb 200 255 255)] + [(= num 8) + (irgb 192 203 255)] + [(= num 9) + (irgb 192 255 203)]))) + + +;;;Procedure:25-num +;;;Parameter:seed, an integer +;;;Purpose:produce a list of 25 integers between 0~24 +;;; with a given seed the list in final, that is each time we input the same seed, the random numbers will be the same +;;;Produce:25-nums, a list +(define 25-num + (lambda (seed) + (random-seed seed) + (let kernel ([list-so-far '()] + [n 25]) + (cond [(< n 1) list-so-far] + [else (kernel (cons (random 25) list-so-far) (- n 1))])))) + + +;;;Purpose:define 4 values, each is a list of 25 integers between 0~24 +;;; these will be used later to determine the position of the stars in the back ground +(define star-col1 (25-num 1)) +(define star-row1 (25-num 2)) +(define star-col2 (25-num 3)) +(define star-row2 (25-num 4)) + + +;;;Procedure:draw-central-circles +;;;Parameter:image, an image +;;; circle-num, an positive integer(in this case will only be between 1~9) +;;; left, a positive number +;;; top, a positive number +;;; right, a positive number, must be bigger than left +;;; bottom, a positive number, must be bigger than top +;;;Purpose:draw circle-num circles on the image with left, top, right, bottom edges respectively +;;;Produce:nothing, but will draw circle-num circles on the image +(define draw-central-circles + (lambda (image circle-num left top right bottom) + (let* ([x-dis (/ (- right left) circle-num 2)] + [y-dis (/ (- bottom top) circle-num 2)] + [lefts (map (l-s + left) (map (l-s * x-dis) (iota circle-num)))] + [tops (map (l-s + top) (map (l-s * y-dis) (iota circle-num)))] + [widths (map (l-s - (- right left)) (map (l-s * (* x-dis 2)) (iota circle-num)))] + [heights (map (l-s - (- bottom top)) (map (l-s * (* y-dis 2)) (iota circle-num)))] + [draw-one-circle! (lambda (l t width height) + (image-select-ellipse! image REPLACE + l t width height) + (image-stroke-selection! image) + (image-select-nothing! image))]) + (for-each draw-one-circle! lefts tops widths heights)))) + + + +;;;Procedure:roman-num +;;;Parameter:image, an image +;;; h, a positive number, the central col of the roman number +;;; k, a positive number, the central row of the roman number +;;; R, a positive number, the radius of the roman number +;;; ratio, the ratio of width and height of the image +;;; num, a integer between 0 and 9 +;;;Purpose:draw a roman-number on the image centered at (h,k) with R radius if ratio is 1, with width of 2R*ratio and height of 2R +;;;Produce:roman-numed, a image with a roman number drawed on it, the raman number is same as the integer inputed +(define roman-num + (lambda (image h k R ratio num) + (let* ([urow (- k (/ R 1.5))] + [lrow (+ k (/ R 1.5))] + [cols (map (l-s + h) (map (r-s * (/ (* R 0.8) 3)) (map (r-s - 3)(iota 7))))] + [my-cols (map (l-s + (* h (- 1 ratio))) (map (l-s * ratio) cols))]) + (cond [(= num 0) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 5) + lrow) + (image-draw-line! image (list-ref my-cols 1) + lrow + (list-ref my-cols 5) + urow)] + [(= num 1) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow)] + [(= num 2) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow)] + [(= num 3) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 4) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 3) + lrow)] + [(= num 5) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 3) + lrow)] + [(= num 6) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow)] + [(= num 7) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 8) + (image-draw-line! image (list-ref my-cols 0) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 9) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 5) + lrow) + (image-draw-line! image (list-ref my-cols 3) + lrow + (list-ref my-cols 5) + urow)])))) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;procedures for tree;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-big-circles +;;;Parameter:image, an image +;;; c-num, an positive integer, the number of the circles +;;; left, the left edge of the circles +;;; top, the top edge of the circles +;;;Purpose:draw concentric circles of c-num on the image with radius of width or height/5, if width and height of the image is the same +;;; draw concentric ellipse of c-num on the image with width of image-width/5, height of image-height/5 +;;;Produce:nothing, draw draw concentric circles(ellipses) of c-num on image +(define draw-big-circles + (lambda (image c-num left top) + (let* ([width (/ (image-width image) 5)] + [height (/ (image-height image) 5)] + [row (+ left (/ width 2))] + [col (+ top (/ height 2))] + [b-hdis (/ width 15)] + [b-vdis (/ height 15)] + [hdis (map (l-s * b-hdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [vdis (map (l-s * b-vdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [widths (map (l-s - width) hdis)] + [heights (map (l-s - height) vdis)] + [draw-one-circle! (lambda (width height) + (image-select-ellipse! image REPLACE + (- row (/ width 2)) (- col (/ height 2)) width height) + (image-stroke-selection! image) + (image-select-nothing! image))]) + (for-each draw-one-circle! widths heights)))) + +;;;Procedure:draw-small-circles +;;;Parameter:image, an image +;;; c-num, an positive integer, the number of the circles +;;; left, the left edge of the circles +;;; top, the top edge of the circles +;;;Purpose:draw concentric circles of c-num on the image with radius of width or height/10, if width and height of the image is the same +;;; draw concentric ellipse of c-num on the image with width of image-width/10, height of image-height/10 +;;;Produce:nothing, draw draw concentric circles(ellipses) of c-num on image +(define draw-small-circles + (lambda (image c-num left top) + (let* ([width (/ (image-width image) 10)] + [height (/ (image-height image) 10)] + [row (+ left (/ width 2))] + [col (+ top (/ height 2))] + [b-hdis (/ width 15)] + [b-vdis (/ height 15)] + [hdis (map (l-s * b-hdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [vdis (map (l-s * b-vdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [widths (map (l-s - width) hdis)] + [heights (map (l-s - height) vdis)] + [draw-one-circle! (lambda (width height) + (image-select-ellipse! image REPLACE + (- row (/ width 2)) (- col (/ height 2)) (ceiling width) (ceiling height)) + (image-stroke-selection! image) + (image-select-nothing! image))]) + (for-each draw-one-circle! widths heights)))) + + +;;;Procedure:draw-line-same +;;;Parameter:turtle, a turtle +;;; left1, the left edge of the first circle +;;; top1, the top edge of the second circles +;;; left2, the left edge of the first circle +;;; top2, the top edge of the second circle +;;; hradius, the horizontal radius of the first "circle" +;;; vradius, the vertical radius of the first "circle" +;;; hradius2, the horizontal radius of the second "circle" +;;; vradius2, the vertical radius of the second "circle" +;;;Purpose: draw a line between two circles +;;;Produce: nothing +(define draw-line-same + (lambda (turtle left1 top1 left2 top2 hradius vradius hradius2 vradius2) + (let* ([col1 (+ left1 hradius)] + [row1 (+ top1 vradius)] + [col2 (+ left2 hradius2)] + [row2 (+ top2 vradius2)]) + (turtle-teleport! turtle col1 row1) + (cond [(and (> col2 col1) (> row2 row1)) + (turtle-face! turtle 45) + (turtle-forward! turtle (* (sqrt 2) (abs(- col1 col2)))) + (turtle-face! turtle 0) + (turtle-forward! turtle (- col2 (turtle-col turtle)))] + [(and (< col2 col1) (> row2 row1)) + (turtle-face! turtle 135) + (turtle-forward! turtle (* (sqrt 2) (abs(- row1 row2)))) + (turtle-face! turtle -180) + (turtle-forward! turtle (- (turtle-col turtle) col2))] + [(and (> col2 col1) (< row2 row1)) + (turtle-face! turtle -45) + (turtle-forward! turtle (* (sqrt 2) (abs(- col1 col2)))) + (turtle-face! turtle 0) + (turtle-forward! turtle (- col2 (turtle-col turtle)))] + [(and (< col2 col1) (< row2 row1)) + (turtle-face! turtle -135) + (turtle-forward! turtle (* (sqrt 2) (abs(- row1 row2)))) + (turtle-face! turtle -90) + (turtle-forward! turtle (- (turtle-col turtle) col2))] + [(and (< col2 col1) (= row2 row1)) + (turtle-face! turtle 180) + (turtle-forward! turtle (abs(- col1 col2)) )] + [(and (> col2 col1) (= row2 row1)) + (turtle-face! turtle 0) + (turtle-forward! turtle (abs(- col1 col2)) )] + [(and (= col2 col1) (< row2 row1)) + (turtle-face! turtle -90) + (turtle-forward! turtle (abs(- row1 row2)) )] + [(and (= col2 col1) (> row2 row1)) + (turtle-face! turtle 90) + (turtle-forward! turtle (abs(- row1 row2)) )] + )))) + + +;;;Procedure:generate-big-list +;;;Parameter:num, an integer between 0~9 +;;;Purpose:generate a list of numbers, later will be used as either the x or y coordinate of big circles in the tree +;;;Produce:generated-big-list, a list +(define generate-big-list + (lambda (num) + (let* ([b-list (map (r-s - 5) (iota 10))] + [fm1 (lambda (n) + (* 4 (+ (sin n) 1)))] + [fm2 (lambda (n) + (* 4 (+ (cos n) 1)))] + [fm3 (lambda (n) + (* (/ 8 25) (sqr n)))] + [fm4 (lambda (n) + (- 8 (* (/ 8 25) (sqr n))))]) + (cond [(= num 0) + (list 5.5 2.5 0 8 6 2 1 7 4.5 3.5)] + [(= num 1) + (map fm1 (map (l-s * (/ pi 5)) b-list))] + [(= num 2) + (map fm2 (map (l-s * (/ pi 5)) b-list))] + [(= num 3) + (map fm3 b-list)] + [(= num 4) + (map fm4 b-list)] + [(= num 5) + (list 0.5 0.5 2 2 3 3 5.5 5.5 7.5 7.5)] + [(= num 6) + (map (l-s + 0.25) (reverse (map (l-s * 0.8) (iota 10))))] + [(= num 7) + (map (l-s + 0.25) (reverse (map (l-s * 0.8) (iota 10))))] + [(= num 8) + (map (l-s + 0.25) (map (l-s * 0.8) (iota 10)))] + [(= num 9) + (map (l-s + 0.25) (map (l-s * 0.8) (iota 10)))])))) + +;;;Procedure:generate-small-list +;;;Parameter:num, an integer between 0~9 +;;;Purpose:generate a list of numbers, later will be used as either the x or y coordinate of small circles in the tree +;;;Produce:generated-small-list, a list +(define generate-small-list + (lambda (num) + (let* ([b-list (map (r-s - 5) (iota 10))] + [fm1 (lambda (n) + (* 4.5 (+ (sin n) 1)))] + [fm2 (lambda (n) + (* 4.5 (+ (cos n) 1)))] + [fm3 (lambda (n) + (* (/ 9 25) (sqr n)))] + [fm4 (lambda (n) + (- 9 (* (/ 9 25) (sqr n))))]) + (cond [(= num 0) + (list 1 8 9 0 4.5 4.5 1 7 2 8)] + [(= num 1) + (map fm1 (map (l-s * (/ pi 5)) b-list))] + [(= num 2) + (map fm2 (map (l-s + pi) (map (l-s * (/ pi 5)) b-list)))] + [(= num 4) + (map fm3 b-list)] + [(= num 3) + (map fm4 b-list)] + [(= num 5) + (list 0.5 0.5 4 4 4.5 6 8 9 9 8)] + [(= num 6) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))] + [(= num 7) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))] + [(= num 8) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))] + [(= num 9) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))])))) + + + +;;;Procedure:draw-tree +;;;Parameter:num, an positive integer of 3 digits +;;; width, an positive integer, the width of the image +;;; height, an positive integer, the height of the image +;;;Purpose:to draw a magic tree, the hundreds digit determines the color of the tree +;;; the tens digit determines the positions of the circles on the tree +;;; the unit digit determines the number of circles inside each of the biggest circle of the tree +;;;Produce:drawed-tree, am image +(define draw-tree + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [unit-width (/ width 10)] + [unit-height (/ height 10)] + [widths (map (l-s * unit-width) (generate-big-list snum))] + [heights (map (l-s * unit-height) (generate-big-list (remainder (+ 5 snum) 10)))] + [s-widths (map (l-s * unit-width) (generate-small-list snum))] + [s-heights (map (l-s * unit-height) (generate-small-list (remainder (+ 5 snum) 10)))] + [fgcolor (generate-color fnum)]) + + (draw-bg image fgcolor) + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + (context-set-fgcolor! fgcolor) + (context-set-brush! "Nova") + (for-each draw-big-circles (make-list 10 image) + (make-list 10 tnum) + widths + heights) + + (for-each draw-small-circles (make-list 10 image) + (make-list 10 tnum) + s-widths + s-heights) + + (turtle-set-brush! tommy "Nova") + (turtle-set-color! tommy fgcolor) + (for-each draw-line-same (make-list 9 tommy) + (map (l-s list-ref widths) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref heights) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref widths) (list 2 4 6 8 7 5 3 1 0)) + (map (l-s list-ref heights) (list 2 4 6 8 7 5 3 1 0)) + (make-list 9 (/ width 10)) + (make-list 9 (/ height 10)) + (make-list 9 (/ width 10)) + (make-list 9 (/ height 10))) + + (for-each draw-line-same (make-list 9 tommy) + (map (l-s list-ref s-widths) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref s-heights) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref s-widths) (list 2 4 6 8 7 5 3 1 0)) + (map (l-s list-ref s-heights) (list 2 4 6 8 7 5 3 1 0)) + (make-list 9 (/ width 20)) + (make-list 9 (/ height 20)) + (make-list 9 (/ width 20)) + (make-list 9 (/ height 20))) + + (for-each draw-line-same (make-list 5 tommy) + (map (l-s list-ref widths) (list 3 4 5 6 7)) + (map (l-s list-ref heights) (list 3 4 5 6 7)) + (map (l-s list-ref s-widths) (list 1 2 5 8 9)) + (map (l-s list-ref s-heights) (list 1 2 5 8 9)) + (make-list 5 (/ width 10)) + (make-list 5 (/ height 10)) + (make-list 5 (/ width 20)) + (make-list 5 (/ height 20))) + (image-refresh-display! image) + (image-show image)))) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;magic 1;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-star +;;;Parameter:image, an image +;;; width, the width of the star to be drawn +;;; height, the height of the star to be drawn +;;;Purpose: to draw a star of width*height on image +;;;Produce:drawn-star, an image +(define draw-star + (lambda (image width height) + (let ([central-col (/ (image-width image)2)] + [central-row (/ (image-height image)2)] + [unit-angle (/ (* 4 pi) 5)] + [start-angle (/ pi 2)]) + (image-draw-line! image central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))) + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomleft + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));bottomleft + (image-draw-line! image (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomright + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));bottomright + (+ central-col (* (/ width 2) (cos (+ start-angle (/ unit-angle 2)))));topleft + (- central-row (* (/ height 2) (sin (+ start-angle (/ unit-angle 2))))));topleft + (image-draw-line! image (+ central-col (* (/ width 2) (cos (+ start-angle (/ unit-angle 2)))));topleft + (- central-row (* (/ height 2) (sin (+ start-angle (/ unit-angle 2)))));topleft + (+ central-col (* (/ width 2) (cos (- start-angle (/ unit-angle 2)))));topright + (- central-row (* (/ height 2) (sin (- start-angle (/ unit-angle 2))))));topright + (image-draw-line! image (+ central-col (* (/ width 2) (cos (- start-angle (/ unit-angle 2)))));topright + (- central-row (* (/ height 2) (sin (- start-angle (/ unit-angle 2)))));topright + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomleft + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));bottomleft + (image-draw-line! image + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomright + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));bottomright + central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))))))) + + +;;;Procedure:draw-magic-circle1 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of roman number showed +;;; tens digit determines the number of the stars +;;; unit digit determines the number of the circles +;;;Produce:magic-circle1, an image +(define draw-magic-circle1 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [ratio (/ width height)] + [image (image-new width height)]) + + (context-set-fgcolor! "black") + (image-select-all! image) + (image-fill-selection! image) + (image-select-nothing! image) + (draw-bg image (color-name->irgb "palegoldenrod")) + (draw-star image width height) + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "palegoldenrod") + (context-set-brush! "Nova") + (image-select-ellipse! image REPLACE + (* 0.1 width) (* 0.1 height) (* 0.8 width) (* 0.8 height)) + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.2 width) (* 0.2 height) (* 0.6 width) (* 0.6 height)) + (image-stroke-selection! image) + (image-select-nothing! image) + + + (cond [(not (= tnum 0)) + (draw-central-circles image tnum (* 0.4 width) (* 0.4 height)(* 0.6 width) (* 0.6 height))]) + + (cond [(not (= snum 0)) + (for-each draw-star (make-list snum image) (map (l-s * (* width 0.45)) (map increment (map (r-s / 10) (iota snum)))) + (map (l-s * (* height 0.45)) (map increment (map (r-s / 10) (iota snum)))))]) + + (roman-num image (* 0.5 width) (* 0.9 height) (* 0.03 (+ width height)) ratio fnum) + (image-refresh-display! image) + (image-show image)))) + + +;;;;;;;;;;;;;;;;;;;;;;;;magic 2;;;;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-squares +;;;Parameter:image, an image +;;; num, an integer, the number of squares +;;; R, a positive number, the radius of the circle which contain the squares +;;; ratio, a positive numebr, image's width/height +;;; c-col, a positive numebr, the central column +;;; c-row, a positive numebr, the central row +;;;Purpose: draw num sqaures within a given circle with R radius +;;;Produce:nothing +(define draw-squares + (lambda (image num R ratio c-col c-row) + (let* ([h c-col] + [k c-row] + [dx1 (lambda (n) + (+ h (* R (cos (- pi (+ (/ pi 4) (* n (/ pi 5))))))))] + [dy1 (lambda (n) + (+ k (* R (sin (+ (/ pi 4) (* n (/ pi 5)))))))] + [dx2 (lambda (n) + (+ h (* R (cos (- pi (+ (* (/ 3 4) pi) (* n (/ pi 5))))))))] + [dy2 (lambda (n) + (+ k (* R (sin (+ (* (/ 3 4) pi) (* n (/ pi 5)))))))] + [dx3 (lambda (n) + (+ h (* R (cos (- pi (+ (* (/ 5 4) pi) (* n (/ pi 5))))))))] + [dy3 (lambda (n) + (+ k (* R (sin (+ (* (/ 5 4) pi) (* n (/ pi 5)))))))] + [dx4 (lambda (n) + (+ h (* R (cos (- pi (+ (* (/ 7 4) pi) (* n (/ pi 5))))))))] + [dy4 (lambda (n) + (+ k (* R (sin (+ (* (/ 7 4) pi) (* n (/ pi 5)))))))] + [create-points (lambda (i) + (list (cons (dx1 i) (dy1 i)) + (cons (dx2 i) (dy2 i)) + (cons (dx3 i) (dy3 i)) + (cons (dx4 i) (dy4 i))))] + [all-points (map create-points (iota 10))] + [picked-points (list-take all-points num)] + [my-points (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i num) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (list (cons (+ (* h (- 1 ratio)) (* (caar (list-ref picked-points i)) ratio)) (cdar (list-ref picked-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caadr (list-ref picked-points i)) ratio)) (cdadr (list-ref picked-points i))) + (cons (+ (* h (- 1 ratio)) (* (caaddr (list-ref picked-points i)) ratio)) (cdaddr (list-ref picked-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caar (cdddr (list-ref picked-points i))) ratio)) (cdar (cdddr (list-ref picked-points i))) )) + cur-points))]))]) + (let kernel2 ([i 0]) + (when (< i num) + (image-select-polygon! image REPLACE (list-ref my-points i)) + (image-stroke-selection! image) + (image-select-nothing! image) + (kernel2 (+ i 1)) + ))))) + +;;;Procedure:draw-spikes +;;;Parameter:image, an image +;;; h, an integer, the x coordinate of the central +;;; k. an integer, the y coordinate of the central +;;; R, a positive number, the radius of the circle which contain the squares +;;; L, a positive number, the half length of the spikes +;;; ratio, a positive numebr, image's width/height +;;;Purpose: draw 3 spikes +;;;Produce:nothing +(define draw-spikes + (lambda (image h k R L ratio) + (let* ([dx1 (lambda (n) + (+ h (* R (cos (- pi (* n (/ pi 4)))))))] + [dy1 (lambda (n) + (+ k (* R (sin (* n (/ pi 4))))))] + [dx2 (lambda (n) + (+ h (* L (cos (- (/ pi 2) (* n (/ pi 4)))))))] + [dy2 (lambda (n) + (+ k (* L (sin (+ (/ pi 2) (* n (/ pi 4)))))))] + [dx3 (lambda (n) + (+ h (* R (cos (* n (/ pi 4))))))] + [dy3 (lambda (n) + (+ k (* R (sin (+ pi (* n (/ pi 4)))))))] + [dx4 (lambda (n) + (- (* 2 h ) (dx2 n)))] + [dy4 (lambda (n) + (- (* 2 k ) (dy2 n)))] + [create-points (lambda (i) + (list (cons (dx1 i) (dy1 i)) + (cons (dx2 i) (dy2 i)) + (cons (dx3 i) (dy3 i)) + (cons (dx4 i) (dy4 i))))] + [all-points (map create-points (iota 4))] + [my-points (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i 4) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (list (cons (+ (* h (- 1 ratio)) (* (caar (list-ref all-points i)) ratio)) (cdar (list-ref all-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caadr (list-ref all-points i)) ratio)) (cdadr (list-ref all-points i))) + (cons (+ (* h (- 1 ratio)) (* (caaddr (list-ref all-points i)) ratio)) (cdaddr (list-ref all-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caar (cdddr (list-ref all-points i))) ratio)) (cdar (cdddr (list-ref all-points i))) )) + cur-points + ))]))]) + (let kernel2 ([i 0]) + (when (< i 4) + (image-select-polygon! image REPLACE (list-ref my-points i)) + (image-stroke-selection! image) + (image-select-nothing! image) + (kernel2 (+ i 1)) + ))))) + +;;;Procedure:draw-magic-circle2 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of squares outside +;;; tens digit determines the number of squares inside +;;; unit digit determines the number of the circles at the centre +;;;Produce:magic-circle2, an image +(define draw-magic-circle2 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [HR (* 0.8 width)] + [VR (* 0.8 height)] + [ratio (/ width height)] + [c-col (/ width 2)] + [c-row (/ height 2)] + [fgcolor (generate-color fnum)]) + + (draw-bg image fgcolor) + + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + + + + (context-set-brush! "2. Hardness 100") + (context-set-fgcolor! "black") + (draw-squares image fnum (/ VR 2.2) ratio c-col c-row) + + (context-set-brush! "GIMP Brush #1") + (context-set-fgcolor! fgcolor) + (image-select-ellipse! image REPLACE (* 0.1 width) (* 0.1 height) HR VR) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "2. Hardness 025" 3) + (image-select-ellipse! image REPLACE (* 0.14 width) (* 0.14 height) (* HR 0.9) (* VR 0.9)) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "Nova") + (context-set-fgcolor! fgcolor) + (draw-squares image fnum (/ VR 2) ratio c-col c-row) + (draw-squares image snum (/ VR 4) ratio c-col c-row) + (draw-spikes image c-col c-row (/ VR 16) (/ VR 3) ratio) + + (if (not (= tnum 0)) + (draw-central-circles image tnum (- c-col (/ VR 4)) (- c-row (/ HR 4)) (+ c-col (/ VR 4)) (+ c-row (/ HR 4))) + (image-refresh-display! image)) + + (image-refresh-display! image) + (image-show image)))) + + + + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;magic 3;;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-pos-triangle +;;;Parameter:image, an image +;;; width, a positive number, width fo the ellipse that contains the tirangle +;;; height, a positive number, height fo the ellipse that contains the tirangle +;;;Purpose:draw a triangle centered at the centre of image +;;;Produce:drawn-pos-triangle, an image +(define draw-pos-triangle + (lambda (image width height) + (let ([central-col (/ (image-width image)2)] + [central-row (/ (image-height image)2)] + [unit-angle (/ (* pi 2) 3)] + [start-angle (/ pi 2)]) + (image-draw-line! image central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))) + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))));zuoxia + ))) + +;;;Procedure:draw-neg-triangle +;;;Parameter:image, an image +;;; width, a positive number, width fo the ellipse that contains the tirangle +;;; height, a positive number, height fo the ellipse that contains the tirangle +;;;Purpose:draw a reversed triangle centered at the centre of image +;;;Produce:drawn-neg-triangle, an image +(define draw-neg-triangle + (lambda (image width height) + (let ([central-col (/ (image-width image)2)] + [central-row (/ (image-height image)2)] + [unit-angle (/ (* pi 2) 3)] + [start-angle (/ pi 2)]) + + (image-draw-line! image central-col ;col1 row1 col2 row2 + (+ central-row (* (/ height 2))) + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + central-col ;col1 row1 col2 row2 + (+ central-row (* (/ height 2))));zuoxia + ))) + + + +;;;Procedure:draw-magic-circle3 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of squares on the angles of the triangle +;;; tens digit determines the number of neg-triangles +;;; unit digit determines the number of pos-triangles +;;;Produce:magic-circle3, an image +(define draw-magic-circle3 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)]) + + (context-set-fgcolor! "black") + (image-select-all! image) + (image-fill-selection! image) + (image-select-nothing! image) + (draw-bg image (generate-color fnum)) + (draw-pos-triangle image width height) + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + (context-set-brush! "Nova") + (context-set-fgcolor! (generate-color fnum)) + (image-select-ellipse! image REPLACE + (* 0.1 width) (* 0.1 height) (* 0.8 width) (* 0.8 height)) + (context-set-fgcolor! (generate-color fnum)) + (image-stroke-selection! image) + + (image-select-ellipse! image REPLACE + (* 0.11 width) (* 0.11 height) (* 0.78 width) (* 0.78 height)) + + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.12 width) (* 0.12 height) (* 0.76 width) (* 0.76 height)) + + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.13 width) (* 0.13 height) (* 0.74 width) (* 0.74 height)) + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.14 width) (* 0.14 height) (* 0.72 width) (* 0.72 height)) + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.15 width) (* 0.15 height) (* 0.7 width) (* 0.7 height)) + (image-stroke-selection! image) + (image-select-nothing! image) + (context-set-brush! "Nova") + (context-set-fgcolor! (generate-color fnum)) + (cond [(not (= 0 tnum)) + (for-each draw-pos-triangle (make-list tnum image) (map (l-s * width) (map (r-s / 10) (map increment (iota tnum)))) + (map (l-s * height) (map (r-s / 10) (map increment (iota tnum)))))]) + (cond [(not (= 0 snum)) + (for-each draw-neg-triangle (make-list snum image) (map (l-s * width) (map (r-s / 10) (map increment (iota snum)))) + (map (l-s * height) (map (r-s / 10) (map increment (iota snum)))))]) + + (draw-pos-triangle image (* 0.9 width) (* 0.9 height)) + (draw-neg-triangle image (* 0.9 width) (* 0.9 height)) + (cond [(not (= 0 fnum)) + (draw-central-circles image fnum (* 0.45 width) 0 (* 0.55 width) (* 0.1 height)) + (draw-central-circles image fnum (* 0.85 width) (* 0.68 height)(* 0.95 width) (* 0.78 height)) + (draw-central-circles image fnum (* 0.05 width) (* 0.68 height)(* 0.15 width) (* 0.78 height))]) + (image-refresh-display! image) + (image-show image) + ))) + + + +;;;;;;;;;;;;;;;;;;;;;;;;magic 4;;;;;;;;;;;;;;;;;;;;;; + + +;;;Procedure:draw-pentagon +;;;Parameter:image, an image +;;; start-col, a positive numebr, the x coordinate of the first point of the pentagon +;;; start-row, a positive numebr,the y coordinate of the first point of the pentagon +;;; R, radius fo the ellipse that contains the tirangle +;;; ratio, a number +;;; draw-or-not, a boolean value +;;; start-angle, the start angle +;;;Purpose:draw a pentagon an ellipse with R radius that contains the tirangle if draw-or-not is #t +;;; returns the position of five points of the pentagon if draw-or-not is #f +;;;Produce:draw-pentagon, an image +(define draw-pentagon + (lambda (image start-col start-row R ratio draw-or-not start-angle) + (let* ([in (/ (* 2 pi) 5)] + [create-col-point (map (lambda (n)(+ start-col (* R (cos (+ start-angle (* n in)))))) (iota 5))] + [create-row-point (map (lambda (n)(- start-row (* R (sin (+ start-angle (* n in)))))) (iota 5))] + [variant-col (lambda (n) (+ (* start-col (- 1 ratio)) (* n ratio)))] + [create-point (lambda (n) + (cons (+ start-col (* R (cos (+ start-angle (* n in))))) + (- start-row (* R (sin (+ start-angle (* n in)))))))] + [create-points (map create-point (iota 5))] + [my-col-point (map variant-col create-col-point)] + [my-points (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i 5) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (cons (+ (* start-col (- 1 ratio)) (* (car (list-ref create-points i)) ratio)) + (cdr (list-ref create-points i))) + cur-points))]))]) + (cond [(equal? draw-or-not #t) + (image-select-polygon! image REPLACE my-points) + (image-stroke-selection! image) + (image-select-nothing! image)] + [else (list my-col-point create-row-point)])))) + + +;;;Procedure:draw-magic-circle4 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of roman number showed +;;; tens digit determines the number of the circles on each of angle of outside pentagon +;;; unit digit determines the number of the circles in the center +;;;Produce:magic-circle4, an image +(define draw-magic-circle4 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [HR (* 0.8 width)] + [VR (* 0.8 height)] + [ratio (/ width height)] + [c-col (/ width 2)] + [c-row (/ height 2)] + [fgcolor (generate-color fnum)] + [in* (/ (* (+ fnum 1) pi) (+ fnum 3))] + [inner-pentagon-col (car (draw-pentagon image c-col c-row (/ (* (* 0.4 width) (sin (*(/ 54 180) pi))) 2) ratio #f (/ pi 3)))] + [inner-pentagon-row (cadr (draw-pentagon image c-col c-row (/ (* (* 0.4 width) (sin (*(/ 54 180) pi))) 2) ratio #f (/ pi 3)))] + [outer-pentagon-col (car (draw-pentagon image c-col c-row (* 0.4 width) ratio #f (/ pi 2)))] + [outer-pentagon-row (cadr (draw-pentagon image c-col c-row (* 0.4 width) ratio #f (/ pi 2)))] + ) + + (draw-bg image fgcolor) + + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + (context-set-fgcolor! "black") + (context-set-brush! "2. Block 01") + + (context-set-fgcolor! fgcolor) + + + (context-set-brush! "Nova") + (image-select-ellipse! image REPLACE (* 0.1 width) (* 0.1 height) HR VR) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "Nova") + (draw-pentagon image c-col c-row (* 0.4 width) ratio #t (/ pi 2)) + (draw-pentagon image c-col c-row (* (* 0.4 width) (sin (*(/ 54 180) pi))) ratio #t (/ (* 3 pi) 2)) + (for-each image-draw-line! (make-list 5 image) + inner-pentagon-col inner-pentagon-row + (append (list (list-ref outer-pentagon-col 3) (list-ref outer-pentagon-col 4)) (list-take outer-pentagon-col 3)) + (append (list (list-ref outer-pentagon-row 3) (list-ref outer-pentagon-row 4))(list-take outer-pentagon-row 3))) + (for-each draw-central-circles (make-list 5 image) (make-list 5 2) + (map (r-s - (* width 0.03)) inner-pentagon-col) + (map (r-s - (* height 0.03)) inner-pentagon-row) + (map (r-s + (* width 0.03)) inner-pentagon-col) + (map (r-s + (* height 0.03))inner-pentagon-row)) + (cond [(not (= 0 snum)) + (for-each draw-central-circles (make-list 5 image) (make-list 5 snum) + (map (r-s - (* width 0.06)) outer-pentagon-col) + (map (r-s - (* height 0.06)) outer-pentagon-row) + (map (r-s + (* width 0.06)) outer-pentagon-col) + (map (r-s + (* height 0.06)) outer-pentagon-row))]) + (cond [(not (= 0 tnum)) + (draw-central-circles image tnum (- c-col (* 0.1 width)) + (- c-row (* 0.1 height)) + (+ c-col (* 0.1 width)) + (+ c-row (* 0.1 height)))]) + (roman-num image (* 0.5 width) (* 0.9 height) (* 0.03 (+ width height)) ratio fnum) + (image-refresh-display! image) + (image-show image)))) + + + +;;;;;;;;;;;;;;;;;;;;;;;magic 5;;;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-poly +;;;Parameter:image, an image +;;; h, an integer, the x coordinate of the central +;;; k. an integer, the y coordinate of the central +;;; R, a positive number, the radius of the circle which contain the squares +;;; m, a positive integer between 0 and 9 +;;; a, a positive number, the start angle +;;; ratio, a positive numebr, image's width/height +;;;Purpose: draw-polyons, with m+3 edges and a certain pattern +;;;Produce:nothing +(define draw-poly + (lambda (image h k R m a ratio) + (let* ([in (/ (* 2 pi) m)] + [create-point (lambda (n) + (cons (+ h (* R (cos (+ (/ pi 2) (* n in))))) + (- k (* R (sin (+ (/ pi 2) (* n in)))))))] + [create-points (map create-point (iota m))] + [my-points (let kernel ([i 0] + [cur-points '()]) + (cond [(>= i m) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (cons (+ (* h (- 1 ratio)) (* (car (list-ref create-points i)) ratio)) + (cdr (list-ref create-points i))) + cur-points))]))] + + [in* (/ (* (- m 2) pi) m)] + [r (* 2 R (sin (/ pi m)))] + [s (* r (/ (sin (- in* a)) (sin (- pi in*))))] + [create-point* (lambda (n) + (cons (+ (car (list-ref create-points n)) + (* s (cos (+ (* 1.5 pi) (- (/ in* 2)) a (* n (- pi in*)))))) + (- (cdr (list-ref create-points n)) + (* s (sin (+ (* 1.5 pi) (- (/ in* 2)) a (* n (- pi in*))))))))] + [create-points* (map create-point* (iota m))] + [my-points* (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i m) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (cons (+ (* h (- 1 ratio)) (* (car (list-ref create-points* i)) ratio)) + (cdr (list-ref create-points* i))) + cur-points + ))]))]) + (image-select-polygon! image REPLACE my-points) + (image-stroke-selection! image) + (image-select-nothing! image) + (let kernel2 ([i 0]) + (when (< i m) + (image-draw-line! image (car (list-ref my-points i)) + (cdr (list-ref my-points i)) + (car (list-ref my-points* i)) + (cdr (list-ref my-points* i))) + (kernel2 (+ i 1)))) + (let kernel3 ([i 0]) + (when (< i m) + (image-draw-line! image (car (list-ref my-points i)) + (cdr (list-ref my-points i)) + (/ (+ (car (list-ref my-points* (remainder (+ i 1) m))) + (car (list-ref my-points (remainder (+ i 1) m)))) 2) + (/ (+ (cdr (list-ref my-points* (remainder (+ i 1) m))) + (cdr (list-ref my-points (remainder (+ i 1) m)))) 2)) + (kernel3 (+ i 1)))) + (let kernel4 ([i 0]) + (when (< i m) + (image-draw-line! image (car (list-ref my-points i)) + (cdr (list-ref my-points i)) + (/ (+ (/ (+ (car (list-ref my-points* i)) + (car (list-ref my-points i))) 2) + (car (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (/ (+ (cdr (list-ref my-points* i)) + (cdr (list-ref my-points i))) 2) + (cdr (list-ref my-points (mod (- i 1) m)))) 2)) + (kernel4 (+ i 1)))) + (let kernel5 ([i 0]) + (when (< i m) + (image-draw-line! image (/ (+ (/ (+ (car (list-ref my-points* i)) + (car (list-ref my-points i))) 2) + (car (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (/ (+ (cdr (list-ref my-points* i)) + (cdr (list-ref my-points i))) 2) + (cdr (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (car (list-ref my-points i)) + (car (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (cdr (list-ref my-points i)) + (cdr (list-ref my-points (mod (- i 1) m)))) 2)) + (kernel5 (+ i 1))))))) + + + +;;;Procedure:draw-magic-circle5 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of edges of the polygon (N+3) +;;; tens digit determines the number of the roman number showed at the top of the magic circle +;;; unit digit determines the number of the roman number showed as the backgroud of the magic circle +;;;Produce:magic-circle5, an image +(define draw-magic-circle5 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [HR (* 0.8 width)] + [VR (* 0.8 height)] + [ratio (/ width height)] + [c-col (/ width 2)] + [c-row (/ height 2)] + [fgcolor (generate-color fnum)] + [in* (/ (* (+ fnum 1) pi) (+ fnum 3))] + ) + + (draw-bg image fgcolor) + + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + (context-set-fgcolor! "black") + (context-set-brush! "2. Block 01") + (roman-num image c-col c-row (/ VR 2) ratio tnum) + + (context-set-fgcolor! fgcolor) + + + (context-set-brush! "Nova") + (image-select-ellipse! image REPLACE (* 0.1 width) (* 0.1 height) HR VR) + (image-stroke-selection! image) + (image-select-nothing! image) + + + (context-set-brush! "GIMP Brush #1") + (image-select-ellipse! image REPLACE (* 0.14 width) (* 0.14 height) (* HR 0.9) (* VR 0.9)) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "Nova") + (draw-poly image c-col c-row (/ (* 0.7 height) 2) (+ fnum 3) (* snum (/ in* 20)) ratio) + (roman-num image c-col (- c-row (/ VR 2)) (/ VR 20) ratio snum) + + + (image-refresh-display! image) + (image-show image)))) + + + diff --git a/project.rkt~ b/project.rkt~ new file mode 100644 index 0000000..804ab97 --- /dev/null +++ b/project.rkt~ @@ -0,0 +1,1414 @@ +#lang racket + +(require gigls/unsafe) + +;;;Procedure:game +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: apply the game mechinism to the whole procedure +;;;Produce: nothing +(define game + (lambda (x width height) + (cond [(= x 0) + (draw-magic-circle1 311 width height)] + [(or (= x 311) + (= x 324) + (= x 339) + (= x 356) + (= x 375) + (= x 396) + (= x 419) + (= x 444) + (= x 471)) + (draw-magic-circle1 (+ 275 (sqr (+ 5 (+ 1 (- (sqrt (- x 275)) 5))))) width height)] + + [(= x 500) + (draw-magic-circle2 28 width height)] + + [(or (= x 28) + (= x 66) + (= x 114) + (= x 172) + (= x 240) + (= x 318) + (= x 406) + (= x 504) + (= x 612)) + (draw-magic-circle2 (round (* 5 (- (sqr (+ 2.3 (+ 1 (- (sqrt (+ (/ x 5) 5.29)) 2.3)))) 5.29))) width height)] + + [(= x 730) + (draw-magic-circle3 841 width height)] + + [(= x 841) + (draw-magic-circle3 909 width height)] + [(= x 909) + (draw-magic-circle3 141 width height)] + [(= x 141) + (draw-magic-circle3 756 width height)] + [(= x 756) + (draw-magic-circle3 958 width height)] + [(= x 958) + (draw-magic-circle3 279 width height)] + [(= x 279) + (draw-magic-circle3 656 width height)] + [(= x 656) + (draw-magic-circle3 989 width height)] + [(= x 989) + (draw-magic-circle3 412 width height)] + [(= x 412) + (draw-magic-circle3 544 width height)] + + + [(= x 544) + (draw-magic-circle4 17 width height)] + + [(or (= x 17) + (= x 53) + (= x 104) + (= x 169) + (= x 247) + (= x 337) + (= x 438) + (= x 549) + (= x 670)) + (draw-magic-circle4 (floor (+ 1 (* 16 (expt (+ 1 (expt (/ (- x 1) 16) (/ 1 1.7))) 1.7)))) width height)] + + [(= x 801) + (draw-magic-circle5 540 width height)] + + + [(= x 540) + (draw-magic-circle5 416 width height)] + [(= x 416) + (draw-magic-circle5 979 width height)] + [(= x 979) + (draw-magic-circle5 653 width height)] + [(= x 653) + (draw-magic-circle5 283 width height)] + [(= x 283) + (draw-magic-circle5 960 width height)] + [(= x 960) + (draw-magic-circle5 753 width height)] + [(= x 753) + (draw-magic-circle5 145 width height)] + [(= x 145) + (draw-magic-circle5 911 width height)] + [(= x 911) + (draw-magic-circle5 839 width height)] + + [(= x 839) + (define source (image-load "/home/chenziwe/Desktop/project/titus.jpg")) + (define target (image-new width height)) + (image-copy-paste-block! + source 0 0 + target 0 0 width height) + (image-show target)] + + + [else (draw-tree x width height)] + ) + + + )) + +;;;;;;;;;;;;;;;;;;;general procedures;;;;;;;;;;;;;;;;;; + +;;;Procedure:split-num +;;;Parameter:num, a three digits number +;;;Purpose:creat a list of 3 numbers, +;;; first is the hundreds digit, next is the tens digit, the last is the unit digit +;;;Produce:splited-num, a list +(define split-num + (lambda (num) + (list (quotient num 100) + (remainder (quotient num 10) 10) + (remainder num 10)))) + +;;;Procedure:draw-bg +;;;Parameter:image, an image +;;; color, an rgb encoded color +;;;Purpose:draw the background of the image, a halo at the center of the image +;;;Produce:drawed-bg, an image with a halo at its center +;;; the inner color is the complement of color inputed with each rgb component substracted by 50 +;;; the outer color is the color inputed with each rgb component substracted by 50 +;;; the outmost strok is the inputed with each rgb component substracted by 240(black if all rgb components is smaller than 240) +(define draw-bg + (lambda (image color) + (let* ([bgcolor (irgb (- (irgb-red color) 50) + (- (irgb-green color) 50) + (- (irgb-blue color) 50))] + [bgcolor2 (irgb (- (irgb-red color) 240) + (- (irgb-green color) 240) + (- (irgb-blue color) 240))] + [icolor (irgb-complement bgcolor)] + [innercolor (irgb (- (irgb-red icolor) 50) + (- (irgb-green icolor) 50) + (- (irgb-blue icolor) 50))] + [center-col (/ (image-width image) 2)] + [center-row (/ (image-height image) 2)] + [h-axis (/ (image-width image) 5)] + [v-axis (/ (image-width image) 10)] + [a h-axis] + [b v-axis] + [r1 (lambda (x y) (floor (/ (* 1.1 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 1.1 a) (* 1.1 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + [r2 (lambda (x y) (floor (/ (* 2 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 2 a) (* 2 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + [r3 (lambda (x y) (floor (/ (* 0.9 a) (sqrt (- 1 (* (- 1 (sqr (/ (* 0.9 a) (* 0.9 b)))) + (/ (sqr (- y center-row)) + (+ (sqr (- x center-col)) + (sqr (- y center-row))))))))))] + + [bg (image-compute + (lambda (x y) + (cond + [(and (> (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) + (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (* (irgb-red bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) + (* (irgb-green bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))) + (* (irgb-blue bgcolor2) (+ 1 (sin (/ (sqrt (+ (sqr (- x center-col)) (sqr (- y center-row)))) (/ a 3))))))] + [(and (> (+ (/ (sqr(- x center-col)) (sqr h-axis)) + (/ (sqr(- y center-row)) (sqr v-axis))) 1) + (<= (+ (/ (sqr(- x center-col)) (sqr (* 2 a))) + (/ (sqr(- y center-row)) (sqr (* 2 b)))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (- (irgb-red bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-red bgcolor))) + (- (irgb-green bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-green bgcolor))) + (- (irgb-blue bgcolor) + (* (/ (- (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r1 x y)) + (- (r2 x y) (r1 x y))) + (irgb-blue bgcolor))))] + [(and (<= (+ (/ (sqr(- x center-col)) (sqr h-axis)) + (/ (sqr(- y center-row)) (sqr v-axis))) 1) + (or (not (= x center-col)) (not (= y center-row)))) + (irgb (+ (irgb-red innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-red bgcolor) (irgb-red innercolor)))) + (+ (irgb-green innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-green bgcolor) (irgb-green innercolor)))) + (+ (irgb-blue innercolor) + (* (/ (sqrt (+ (sqr (- x center-col)) + (sqr (- y center-row)))) + (r3 x y)) + (- (irgb-blue bgcolor) (irgb-blue innercolor)))))] + [else innercolor])) + (image-width image) (image-height image))]) + (image-copy-paste-block! bg 0 0 image 0 0 (image-width image) (image-height image))))) + + +;;;Procedure:generate-color +;;;Parameter:num, an integer between 0~9 +;;;Purpose:creat return an rgb encoded color depending on ten conditions(input 0~9) +;;; with name of "white" "lightsalmon" "lightblue" "gainsboro" "lavender" "lemonchiffon" "pink" "lightcyan" "lightblue" "paleturquoise",respectively +;;;Produce:generated-colors, an rgb encoded color +(define generate-color + (lambda (num) + (cond [(= num 0) + (irgb 255 255 255)] + [(= num 1) + (irgb 255 150 150)] + [(= num 2) + (irgb 200 200 255)] + [(= num 3) + (irgb 200 255 200)] + [(= num 4) + (irgb 255 200 255)] + [(= num 5) + (irgb 255 255 200)] + [(= num 6) + (irgb 255 192 203)] + [(= num 7) + (irgb 200 255 255)] + [(= num 8) + (irgb 192 203 255)] + [(= num 9) + (irgb 192 255 203)]))) + + +;;;Procedure:25-num +;;;Parameter:seed, an integer +;;;Purpose:produce a list of 25 integers between 0~24 +;;; with a given seed the list in final, that is each time we input the same seed, the random numbers will be the same +;;;Produce:25-nums, a list +(define 25-num + (lambda (seed) + (random-seed seed) + (let kernel ([list-so-far '()] + [n 25]) + (cond [(< n 1) list-so-far] + [else (kernel (cons (random 25) list-so-far) (- n 1))])))) + + +;;;Purpose:define 4 values, each is a list of 25 integers between 0~24 +;;; these will be used later to determine the position of the stars in the back ground +(define star-col1 (25-num 1)) +(define star-row1 (25-num 2)) +(define star-col2 (25-num 3)) +(define star-row2 (25-num 4)) + + +;;;Procedure:draw-central-circles +;;;Parameter:image, an image +;;; circle-num, an positive integer(in this case will only be between 1~9) +;;; left, a positive number +;;; top, a positive number +;;; right, a positive number, must be bigger than left +;;; bottom, a positive number, must be bigger than top +;;;Purpose:draw circle-num circles on the image with left, top, right, bottom edges respectively +;;;Produce:nothing, but will draw circle-num circles on the image +(define draw-central-circles + (lambda (image circle-num left top right bottom) + (let* ([x-dis (/ (- right left) circle-num 2)] + [y-dis (/ (- bottom top) circle-num 2)] + [lefts (map (l-s + left) (map (l-s * x-dis) (iota circle-num)))] + [tops (map (l-s + top) (map (l-s * y-dis) (iota circle-num)))] + [widths (map (l-s - (- right left)) (map (l-s * (* x-dis 2)) (iota circle-num)))] + [heights (map (l-s - (- bottom top)) (map (l-s * (* y-dis 2)) (iota circle-num)))] + [draw-one-circle! (lambda (l t width height) + (image-select-ellipse! image REPLACE + l t width height) + (image-stroke-selection! image) + (image-select-nothing! image))]) + (for-each draw-one-circle! lefts tops widths heights)))) + + + +;;;Procedure:roman-num +;;;Parameter:image, an image +;;; h, a positive number, the central col of the roman number +;;; k, a positive number, the central row of the roman number +;;; R, a positive number, the radius of the roman number +;;; ratio, the ratio of width and height of the image +;;; num, a integer between 0 and 9 +;;;Purpose:draw a roman-number on the image centered at (h,k) with R radius if ratio is 1, with width of 2R*ratio and height of 2R +;;;Produce:roman-numed, a image with a roman number drawed on it, the raman number is same as the integer inputed +(define roman-num + (lambda (image h k R ratio num) + (let* ([urow (- k (/ R 1.5))] + [lrow (+ k (/ R 1.5))] + [cols (map (l-s + h) (map (r-s * (/ (* R 0.8) 3)) (map (r-s - 3)(iota 7))))] + [my-cols (map (l-s + (* h (- 1 ratio))) (map (l-s * ratio) cols))]) + (cond [(= num 0) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 5) + lrow) + (image-draw-line! image (list-ref my-cols 1) + lrow + (list-ref my-cols 5) + urow)] + [(= num 1) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow)] + [(= num 2) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow)] + [(= num 3) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 4) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 3) + lrow)] + [(= num 5) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 3) + lrow)] + [(= num 6) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow)] + [(= num 7) + (image-draw-line! image (list-ref my-cols 1) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 8) + (image-draw-line! image (list-ref my-cols 0) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 1) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 3) + lrow) + (image-draw-line! image (list-ref my-cols 4) + urow + (list-ref my-cols 4) + lrow) + (image-draw-line! image (list-ref my-cols 5) + urow + (list-ref my-cols 5) + lrow)] + [(= num 9) + (image-draw-line! image (list-ref my-cols 2) + urow + (list-ref my-cols 2) + lrow) + (image-draw-line! image (list-ref my-cols 3) + urow + (list-ref my-cols 5) + lrow) + (image-draw-line! image (list-ref my-cols 3) + lrow + (list-ref my-cols 5) + urow)])))) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;procedures for tree;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-big-circles +;;;Parameter:image, an image +;;; c-num, an positive integer, the number of the circles +;;; left, the left edge of the circles +;;; top, the top edge of the circles +;;;Purpose:draw concentric circles of c-num on the image with radius of width or height/5, if width and height of the image is the same +;;; draw concentric ellipse of c-num on the image with width of image-width/5, height of image-height/5 +;;;Produce:nothing, draw draw concentric circles(ellipses) of c-num on image +(define draw-big-circles + (lambda (image c-num left top) + (let* ([width (/ (image-width image) 5)] + [height (/ (image-height image) 5)] + [row (+ left (/ width 2))] + [col (+ top (/ height 2))] + [b-hdis (/ width 15)] + [b-vdis (/ height 15)] + [hdis (map (l-s * b-hdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [vdis (map (l-s * b-vdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [widths (map (l-s - width) hdis)] + [heights (map (l-s - height) vdis)] + [draw-one-circle! (lambda (width height) + (image-select-ellipse! image REPLACE + (- row (/ width 2)) (- col (/ height 2)) width height) + (image-stroke-selection! image) + (image-select-nothing! image))]) + (for-each draw-one-circle! widths heights)))) + +;;;Procedure:draw-small-circles +;;;Parameter:image, an image +;;; c-num, an positive integer, the number of the circles +;;; left, the left edge of the circles +;;; top, the top edge of the circles +;;;Purpose:draw concentric circles of c-num on the image with radius of width or height/10, if width and height of the image is the same +;;; draw concentric ellipse of c-num on the image with width of image-width/10, height of image-height/10 +;;;Produce:nothing, draw draw concentric circles(ellipses) of c-num on image +(define draw-small-circles + (lambda (image c-num left top) + (let* ([width (/ (image-width image) 10)] + [height (/ (image-height image) 10)] + [row (+ left (/ width 2))] + [col (+ top (/ height 2))] + [b-hdis (/ width 15)] + [b-vdis (/ height 15)] + [hdis (map (l-s * b-hdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [vdis (map (l-s * b-vdis) (list-take (list 0 1 6 7 11 12 8 9 3 4) (+ c-num 1)))] + [widths (map (l-s - width) hdis)] + [heights (map (l-s - height) vdis)] + [draw-one-circle! (lambda (width height) + (image-select-ellipse! image REPLACE + (- row (/ width 2)) (- col (/ height 2)) (ceiling width) (ceiling height)) + (image-stroke-selection! image) + (image-select-nothing! image))]) + (for-each draw-one-circle! widths heights)))) + + +;;;Procedure:draw-line-same +;;;Parameter:turtle, a turtle +;;; left1, the left edge of the first circle +;;; top1, the top edge of the second circles +;;; left2, the left edge of the first circle +;;; top2, the top edge of the second circle +;;; hradius, the horizontal radius of the first "circle" +;;; vradius, the vertical radius of the first "circle" +;;; hradius2, the horizontal radius of the second "circle" +;;; vradius2, the vertical radius of the second "circle" +;;;Purpose: draw a line between two circles +;;;Produce: nothing +(define draw-line-same + (lambda (turtle left1 top1 left2 top2 hradius vradius hradius2 vradius2) + (let* ([col1 (+ left1 hradius)] + [row1 (+ top1 vradius)] + [col2 (+ left2 hradius2)] + [row2 (+ top2 vradius2)]) + (turtle-teleport! turtle col1 row1) + (cond [(and (> col2 col1) (> row2 row1)) + (turtle-face! turtle 45) + (turtle-forward! turtle (* (sqrt 2) (abs(- col1 col2)))) + (turtle-face! turtle 0) + (turtle-forward! turtle (- col2 (turtle-col turtle)))] + [(and (< col2 col1) (> row2 row1)) + (turtle-face! turtle 135) + (turtle-forward! turtle (* (sqrt 2) (abs(- row1 row2)))) + (turtle-face! turtle -180) + (turtle-forward! turtle (- (turtle-col turtle) col2))] + [(and (> col2 col1) (< row2 row1)) + (turtle-face! turtle -45) + (turtle-forward! turtle (* (sqrt 2) (abs(- col1 col2)))) + (turtle-face! turtle 0) + (turtle-forward! turtle (- col2 (turtle-col turtle)))] + [(and (< col2 col1) (< row2 row1)) + (turtle-face! turtle -135) + (turtle-forward! turtle (* (sqrt 2) (abs(- row1 row2)))) + (turtle-face! turtle -90) + (turtle-forward! turtle (- (turtle-col turtle) col2))] + [(and (< col2 col1) (= row2 row1)) + (turtle-face! turtle 180) + (turtle-forward! turtle (abs(- col1 col2)) )] + [(and (> col2 col1) (= row2 row1)) + (turtle-face! turtle 0) + (turtle-forward! turtle (abs(- col1 col2)) )] + [(and (= col2 col1) (< row2 row1)) + (turtle-face! turtle -90) + (turtle-forward! turtle (abs(- row1 row2)) )] + [(and (= col2 col1) (> row2 row1)) + (turtle-face! turtle 90) + (turtle-forward! turtle (abs(- row1 row2)) )] + )))) + + +;;;Procedure:generate-big-list +;;;Parameter:num, an integer between 0~9 +;;;Purpose:generate a list of numbers, later will be used as either the x or y coordinate of big circles in the tree +;;;Produce:generated-big-list, a list +(define generate-big-list + (lambda (num) + (let* ([b-list (map (r-s - 5) (iota 10))] + [fm1 (lambda (n) + (* 4 (+ (sin n) 1)))] + [fm2 (lambda (n) + (* 4 (+ (cos n) 1)))] + [fm3 (lambda (n) + (* (/ 8 25) (sqr n)))] + [fm4 (lambda (n) + (- 8 (* (/ 8 25) (sqr n))))]) + (cond [(= num 0) + (list 5.5 2.5 0 8 6 2 1 7 4.5 3.5)] + [(= num 1) + (map fm1 (map (l-s * (/ pi 5)) b-list))] + [(= num 2) + (map fm2 (map (l-s * (/ pi 5)) b-list))] + [(= num 3) + (map fm3 b-list)] + [(= num 4) + (map fm4 b-list)] + [(= num 5) + (list 0.5 0.5 2 2 3 3 5.5 5.5 7.5 7.5)] + [(= num 6) + (map (l-s + 0.25) (reverse (map (l-s * 0.8) (iota 10))))] + [(= num 7) + (map (l-s + 0.25) (reverse (map (l-s * 0.8) (iota 10))))] + [(= num 8) + (map (l-s + 0.25) (map (l-s * 0.8) (iota 10)))] + [(= num 9) + (map (l-s + 0.25) (map (l-s * 0.8) (iota 10)))])))) + +;;;Procedure:generate-small-list +;;;Parameter:num, an integer between 0~9 +;;;Purpose:generate a list of numbers, later will be used as either the x or y coordinate of small circles in the tree +;;;Produce:generated-small-list, a list +(define generate-small-list + (lambda (num) + (let* ([b-list (map (r-s - 5) (iota 10))] + [fm1 (lambda (n) + (* 4.5 (+ (sin n) 1)))] + [fm2 (lambda (n) + (* 4.5 (+ (cos n) 1)))] + [fm3 (lambda (n) + (* (/ 9 25) (sqr n)))] + [fm4 (lambda (n) + (- 9 (* (/ 9 25) (sqr n))))]) + (cond [(= num 0) + (list 1 8 9 0 4.5 4.5 1 7 2 8)] + [(= num 1) + (map fm1 (map (l-s * (/ pi 5)) b-list))] + [(= num 2) + (map fm2 (map (l-s + pi) (map (l-s * (/ pi 5)) b-list)))] + [(= num 4) + (map fm3 b-list)] + [(= num 3) + (map fm4 b-list)] + [(= num 5) + (list 0.5 0.5 4 4 4.5 6 8 9 9 8)] + [(= num 6) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))] + [(= num 7) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))] + [(= num 8) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))] + [(= num 9) + (map (l-s + 0.5) (map (l-s * 0.9) (iota 10)))])))) + + + +;;;Procedure:draw-tree +;;;Parameter:num, an positive integer of 3 digits +;;; width, an positive integer, the width of the image +;;; height, an positive integer, the height of the image +;;;Purpose:to draw a magic tree, the hundreds digit determines the color of the tree +;;; the tens digit determines the positions of the circles on the tree +;;; the unit digit determines the number of circles inside each of the biggest circle of the tree +;;;Produce:drawed-tree, am image +(define draw-tree + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [unit-width (/ width 10)] + [unit-height (/ height 10)] + [widths (map (l-s * unit-width) (generate-big-list snum))] + [heights (map (l-s * unit-height) (generate-big-list (remainder (+ 5 snum) 10)))] + [s-widths (map (l-s * unit-width) (generate-small-list snum))] + [s-heights (map (l-s * unit-height) (generate-small-list (remainder (+ 5 snum) 10)))] + [fgcolor (generate-color fnum)]) + + (draw-bg image fgcolor) + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + (context-set-fgcolor! fgcolor) + (context-set-brush! "Nova") + (for-each draw-big-circles (make-list 10 image) + (make-list 10 tnum) + widths + heights) + + (for-each draw-small-circles (make-list 10 image) + (make-list 10 tnum) + s-widths + s-heights) + + (turtle-set-brush! tommy "Nova") + (turtle-set-color! tommy fgcolor) + (for-each draw-line-same (make-list 9 tommy) + (map (l-s list-ref widths) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref heights) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref widths) (list 2 4 6 8 7 5 3 1 0)) + (map (l-s list-ref heights) (list 2 4 6 8 7 5 3 1 0)) + (make-list 9 (/ width 10)) + (make-list 9 (/ height 10)) + (make-list 9 (/ width 10)) + (make-list 9 (/ height 10))) + + (for-each draw-line-same (make-list 9 tommy) + (map (l-s list-ref s-widths) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref s-heights) (list 0 2 4 6 8 7 5 3 1)) + (map (l-s list-ref s-widths) (list 2 4 6 8 7 5 3 1 0)) + (map (l-s list-ref s-heights) (list 2 4 6 8 7 5 3 1 0)) + (make-list 9 (/ width 20)) + (make-list 9 (/ height 20)) + (make-list 9 (/ width 20)) + (make-list 9 (/ height 20))) + + (for-each draw-line-same (make-list 5 tommy) + (map (l-s list-ref widths) (list 3 4 5 6 7)) + (map (l-s list-ref heights) (list 3 4 5 6 7)) + (map (l-s list-ref s-widths) (list 1 2 5 8 9)) + (map (l-s list-ref s-heights) (list 1 2 5 8 9)) + (make-list 5 (/ width 10)) + (make-list 5 (/ height 10)) + (make-list 5 (/ width 20)) + (make-list 5 (/ height 20))) + (image-refresh-display! image) + (image-show image)))) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;magic 1;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-star +;;;Parameter:image, an image +;;; width, the width of the star to be drawn +;;; height, the height of the star to be drawn +;;;Purpose: to draw a star of width*height on image +;;;Produce:drawn-star, an image +(define draw-star + (lambda (image width height) + (let ([central-col (/ (image-width image)2)] + [central-row (/ (image-height image)2)] + [unit-angle (/ (* 4 pi) 5)] + [start-angle (/ pi 2)]) + (image-draw-line! image central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))) + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomleft + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));bottomleft + (image-draw-line! image (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomright + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));bottomright + (+ central-col (* (/ width 2) (cos (+ start-angle (/ unit-angle 2)))));topleft + (- central-row (* (/ height 2) (sin (+ start-angle (/ unit-angle 2))))));topleft + (image-draw-line! image (+ central-col (* (/ width 2) (cos (+ start-angle (/ unit-angle 2)))));topleft + (- central-row (* (/ height 2) (sin (+ start-angle (/ unit-angle 2)))));topleft + (+ central-col (* (/ width 2) (cos (- start-angle (/ unit-angle 2)))));topright + (- central-row (* (/ height 2) (sin (- start-angle (/ unit-angle 2))))));topright + (image-draw-line! image (+ central-col (* (/ width 2) (cos (- start-angle (/ unit-angle 2)))));topright + (- central-row (* (/ height 2) (sin (- start-angle (/ unit-angle 2)))));topright + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomleft + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));bottomleft + (image-draw-line! image + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));bottomright + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));bottomright + central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))))))) + + +;;;Procedure:draw-magic-circle1 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of roman number showed +;;; tens digit determines the number of the stars +;;; unit digit determines the number of the circles +;;;Produce:magic-circle1, an image +(define draw-magic-circle1 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [ratio (/ width height)] + [image (image-new width height)]) + + (context-set-fgcolor! "black") + (image-select-all! image) + (image-fill-selection! image) + (image-select-nothing! image) + (draw-bg image (color-name->irgb "palegoldenrod")) + (draw-star image width height) + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "palegoldenrod") + (context-set-brush! "Nova") + (image-select-ellipse! image REPLACE + (* 0.1 width) (* 0.1 height) (* 0.8 width) (* 0.8 height)) + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.2 width) (* 0.2 height) (* 0.6 width) (* 0.6 height)) + (image-stroke-selection! image) + (image-select-nothing! image) + + + (cond [(not (= tnum 0)) + (draw-central-circles image tnum (* 0.4 width) (* 0.4 height)(* 0.6 width) (* 0.6 height))]) + + (cond [(not (= snum 0)) + (for-each draw-star (make-list snum image) (map (l-s * (* width 0.45)) (map increment (map (r-s / 10) (iota snum)))) + (map (l-s * (* height 0.45)) (map increment (map (r-s / 10) (iota snum)))))]) + + (roman-num image (* 0.5 width) (* 0.9 height) (* 0.03 (+ width height)) ratio fnum) + (image-refresh-display! image) + (image-show image)))) + + +;;;;;;;;;;;;;;;;;;;;;;;;magic 2;;;;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-squares +;;;Parameter:image, an image +;;; num, an integer, the number of squares +;;; R, a positive number, the radius of the circle which contain the squares +;;; ratio, a positive numebr, image's width/height +;;; c-col, a positive numebr, the central column +;;; c-row, a positive numebr, the central row +;;;Purpose: draw num sqaures within a given circle with R radius +;;;Produce:nothing +(define draw-squares + (lambda (image num R ratio c-col c-row) + (let* ([h c-col] + [k c-row] + [dx1 (lambda (n) + (+ h (* R (cos (- pi (+ (/ pi 4) (* n (/ pi 5))))))))] + [dy1 (lambda (n) + (+ k (* R (sin (+ (/ pi 4) (* n (/ pi 5)))))))] + [dx2 (lambda (n) + (+ h (* R (cos (- pi (+ (* (/ 3 4) pi) (* n (/ pi 5))))))))] + [dy2 (lambda (n) + (+ k (* R (sin (+ (* (/ 3 4) pi) (* n (/ pi 5)))))))] + [dx3 (lambda (n) + (+ h (* R (cos (- pi (+ (* (/ 5 4) pi) (* n (/ pi 5))))))))] + [dy3 (lambda (n) + (+ k (* R (sin (+ (* (/ 5 4) pi) (* n (/ pi 5)))))))] + [dx4 (lambda (n) + (+ h (* R (cos (- pi (+ (* (/ 7 4) pi) (* n (/ pi 5))))))))] + [dy4 (lambda (n) + (+ k (* R (sin (+ (* (/ 7 4) pi) (* n (/ pi 5)))))))] + [create-points (lambda (i) + (list (cons (dx1 i) (dy1 i)) + (cons (dx2 i) (dy2 i)) + (cons (dx3 i) (dy3 i)) + (cons (dx4 i) (dy4 i))))] + [all-points (map create-points (iota 10))] + [picked-points (list-take all-points num)] + [my-points (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i num) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (list (cons (+ (* h (- 1 ratio)) (* (caar (list-ref picked-points i)) ratio)) (cdar (list-ref picked-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caadr (list-ref picked-points i)) ratio)) (cdadr (list-ref picked-points i))) + (cons (+ (* h (- 1 ratio)) (* (caaddr (list-ref picked-points i)) ratio)) (cdaddr (list-ref picked-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caar (cdddr (list-ref picked-points i))) ratio)) (cdar (cdddr (list-ref picked-points i))) )) + cur-points))]))]) + (let kernel2 ([i 0]) + (when (< i num) + (image-select-polygon! image REPLACE (list-ref my-points i)) + (image-stroke-selection! image) + (image-select-nothing! image) + (kernel2 (+ i 1)) + ))))) + +;;;Procedure:draw-spikes +;;;Parameter:image, an image +;;; h, an integer, the x coordinate of the central +;;; k. an integer, the y coordinate of the central +;;; R, a positive number, the radius of the circle which contain the squares +;;; L, a positive number, the half length of the spikes +;;; ratio, a positive numebr, image's width/height +;;;Purpose: draw 3 spikes +;;;Produce:nothing +(define draw-spikes + (lambda (image h k R L ratio) + (let* ([dx1 (lambda (n) + (+ h (* R (cos (- pi (* n (/ pi 4)))))))] + [dy1 (lambda (n) + (+ k (* R (sin (* n (/ pi 4))))))] + [dx2 (lambda (n) + (+ h (* L (cos (- (/ pi 2) (* n (/ pi 4)))))))] + [dy2 (lambda (n) + (+ k (* L (sin (+ (/ pi 2) (* n (/ pi 4)))))))] + [dx3 (lambda (n) + (+ h (* R (cos (* n (/ pi 4))))))] + [dy3 (lambda (n) + (+ k (* R (sin (+ pi (* n (/ pi 4)))))))] + [dx4 (lambda (n) + (- (* 2 h ) (dx2 n)))] + [dy4 (lambda (n) + (- (* 2 k ) (dy2 n)))] + [create-points (lambda (i) + (list (cons (dx1 i) (dy1 i)) + (cons (dx2 i) (dy2 i)) + (cons (dx3 i) (dy3 i)) + (cons (dx4 i) (dy4 i))))] + [all-points (map create-points (iota 4))] + [my-points (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i 4) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (list (cons (+ (* h (- 1 ratio)) (* (caar (list-ref all-points i)) ratio)) (cdar (list-ref all-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caadr (list-ref all-points i)) ratio)) (cdadr (list-ref all-points i))) + (cons (+ (* h (- 1 ratio)) (* (caaddr (list-ref all-points i)) ratio)) (cdaddr (list-ref all-points i)) ) + (cons (+ (* h (- 1 ratio)) (* (caar (cdddr (list-ref all-points i))) ratio)) (cdar (cdddr (list-ref all-points i))) )) + cur-points + ))]))]) + (let kernel2 ([i 0]) + (when (< i 4) + (image-select-polygon! image REPLACE (list-ref my-points i)) + (image-stroke-selection! image) + (image-select-nothing! image) + (kernel2 (+ i 1)) + ))))) + +;;;Procedure:draw-magic-circle2 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of squares outside +;;; tens digit determines the number of squares inside +;;; unit digit determines the number of the circles at the centre +;;;Produce:magic-circle2, an image +(define draw-magic-circle2 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [HR (* 0.8 width)] + [VR (* 0.8 height)] + [ratio (/ width height)] + [c-col (/ width 2)] + [c-row (/ height 2)] + [fgcolor (generate-color fnum)]) + + (draw-bg image fgcolor) + + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + + + + (context-set-brush! "2. Hardness 100") + (context-set-fgcolor! "black") + (draw-squares image fnum (/ VR 2.2) ratio c-col c-row) + + (context-set-brush! "GIMP Brush #1") + (context-set-fgcolor! fgcolor) + (image-select-ellipse! image REPLACE (* 0.1 width) (* 0.1 height) HR VR) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "2. Hardness 025" 3) + (image-select-ellipse! image REPLACE (* 0.14 width) (* 0.14 height) (* HR 0.9) (* VR 0.9)) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "Nova") + (context-set-fgcolor! fgcolor) + (draw-squares image fnum (/ VR 2) ratio c-col c-row) + (draw-squares image snum (/ VR 4) ratio c-col c-row) + (draw-spikes image c-col c-row (/ VR 16) (/ VR 3) ratio) + + (if (not (= tnum 0)) + (draw-central-circles image tnum (- c-col (/ VR 4)) (- c-row (/ HR 4)) (+ c-col (/ VR 4)) (+ c-row (/ HR 4))) + (image-refresh-display! image)) + + (image-refresh-display! image) + (image-show image)))) + + + + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;magic 3;;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-pos-triangle +;;;Parameter:image, an image +;;; width, a positive number, width fo the ellipse that contains the tirangle +;;; height, a positive number, height fo the ellipse that contains the tirangle +;;;Purpose:draw a triangle centered at the centre of image +;;;Produce:drawn-pos-triangle, an image +(define draw-pos-triangle + (lambda (image width height) + (let ([central-col (/ (image-width image)2)] + [central-row (/ (image-height image)2)] + [unit-angle (/ (* pi 2) 3)] + [start-angle (/ pi 2)]) + (image-draw-line! image central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))) + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (- central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + central-col ;col1 row1 col2 row2 + (- central-row (* (/ height 2))));zuoxia + ))) + +;;;Procedure:draw-neg-triangle +;;;Parameter:image, an image +;;; width, a positive number, width fo the ellipse that contains the tirangle +;;; height, a positive number, height fo the ellipse that contains the tirangle +;;;Purpose:draw a reversed triangle centered at the centre of image +;;;Produce:drawn-neg-triangle, an image +(define draw-neg-triangle + (lambda (image width height) + (let ([central-col (/ (image-width image)2)] + [central-row (/ (image-height image)2)] + [unit-angle (/ (* pi 2) 3)] + [start-angle (/ pi 2)]) + + (image-draw-line! image central-col ;col1 row1 col2 row2 + (+ central-row (* (/ height 2))) + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + (- central-col (* (/ width 2) (cos (+ start-angle unit-angle))));zuoxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle)))));zuoxia + (image-draw-line! image + (+ central-col (* (/ width 2) (cos (+ start-angle unit-angle))));youxia + (+ central-row (* (/ height 2) (sin (+ start-angle unit-angle))));youxia + central-col ;col1 row1 col2 row2 + (+ central-row (* (/ height 2))));zuoxia + ))) + + + +;;;Procedure:draw-magic-circle3 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of squares on the angles of the triangle +;;; tens digit determines the number of neg-triangles +;;; unit digit determines the number of pos-triangles +;;;Produce:magic-circle3, an image +(define draw-magic-circle3 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)]) + + (context-set-fgcolor! "black") + (image-select-all! image) + (image-fill-selection! image) + (image-select-nothing! image) + (draw-bg image (generate-color fnum)) + (draw-pos-triangle image width height) + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + (context-set-brush! "Nova") + (context-set-fgcolor! (generate-color fnum)) + (image-select-ellipse! image REPLACE + (* 0.1 width) (* 0.1 height) (* 0.8 width) (* 0.8 height)) + (context-set-fgcolor! (generate-color fnum)) + (image-stroke-selection! image) + + (image-select-ellipse! image REPLACE + (* 0.11 width) (* 0.11 height) (* 0.78 width) (* 0.78 height)) + + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.12 width) (* 0.12 height) (* 0.76 width) (* 0.76 height)) + + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.13 width) (* 0.13 height) (* 0.74 width) (* 0.74 height)) + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.14 width) (* 0.14 height) (* 0.72 width) (* 0.72 height)) + (image-stroke-selection! image) + (image-select-ellipse! image REPLACE + (* 0.15 width) (* 0.15 height) (* 0.7 width) (* 0.7 height)) + (image-stroke-selection! image) + (image-select-nothing! image) + (context-set-brush! "Nova") + (context-set-fgcolor! (generate-color fnum)) + (cond [(not (= 0 tnum)) + (for-each draw-pos-triangle (make-list tnum image) (map (l-s * width) (map (r-s / 10) (map increment (iota tnum)))) + (map (l-s * height) (map (r-s / 10) (map increment (iota tnum)))))]) + (cond [(not (= 0 snum)) + (for-each draw-neg-triangle (make-list snum image) (map (l-s * width) (map (r-s / 10) (map increment (iota snum)))) + (map (l-s * height) (map (r-s / 10) (map increment (iota snum)))))]) + + (draw-pos-triangle image (* 0.9 width) (* 0.9 height)) + (draw-neg-triangle image (* 0.9 width) (* 0.9 height)) + (cond [(not (= 0 fnum)) + (draw-central-circles image fnum (* 0.45 width) 0 (* 0.55 width) (* 0.1 height)) + (draw-central-circles image fnum (* 0.85 width) (* 0.68 height)(* 0.95 width) (* 0.78 height)) + (draw-central-circles image fnum (* 0.05 width) (* 0.68 height)(* 0.15 width) (* 0.78 height))]) + (image-refresh-display! image) + (image-show image) + ))) + + + +;;;;;;;;;;;;;;;;;;;;;;;;magic 4;;;;;;;;;;;;;;;;;;;;;; + + +;;;Procedure:draw-pentagon +;;;Parameter:image, an image +;;; start-col, a positive numebr, the x coordinate of the first point of the pentagon +;;; start-row, a positive numebr,the y coordinate of the first point of the pentagon +;;; R, radius fo the ellipse that contains the tirangle +;;; ratio, a number +;;; draw-or-not, a boolean value +;;; start-angle, the start angle +;;;Purpose:draw a pentagon an ellipse with R radius that contains the tirangle if draw-or-not is #t +;;; returns the position of five points of the pentagon if draw-or-not is #f +;;;Produce:draw-pentagon, an image +(define draw-pentagon + (lambda (image start-col start-row R ratio draw-or-not start-angle) + (let* ([in (/ (* 2 pi) 5)] + [create-col-point (map (lambda (n)(+ start-col (* R (cos (+ start-angle (* n in)))))) (iota 5))] + [create-row-point (map (lambda (n)(- start-row (* R (sin (+ start-angle (* n in)))))) (iota 5))] + [variant-col (lambda (n) (+ (* start-col (- 1 ratio)) (* n ratio)))] + [create-point (lambda (n) + (cons (+ start-col (* R (cos (+ start-angle (* n in))))) + (- start-row (* R (sin (+ start-angle (* n in)))))))] + [create-points (map create-point (iota 5))] + [my-col-point (map variant-col create-col-point)] + [my-points (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i 5) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (cons (+ (* start-col (- 1 ratio)) (* (car (list-ref create-points i)) ratio)) + (cdr (list-ref create-points i))) + cur-points))]))]) + (cond [(equal? draw-or-not #t) + (image-select-polygon! image REPLACE my-points) + (image-stroke-selection! image) + (image-select-nothing! image)] + [else (list my-col-point create-row-point)])))) + + +;;;Procedure:draw-magic-circle4 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of roman number showed +;;; tens digit determines the number of the circles on each of angle of outside pentagon +;;; unit digit determines the number of the circles in the center +;;;Produce:magic-circle4, an image +(define draw-magic-circle4 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [HR (* 0.8 width)] + [VR (* 0.8 height)] + [ratio (/ width height)] + [c-col (/ width 2)] + [c-row (/ height 2)] + [fgcolor (generate-color fnum)] + [in* (/ (* (+ fnum 1) pi) (+ fnum 3))] + [inner-pentagon-col (car (draw-pentagon image c-col c-row (/ (* (* 0.4 width) (sin (*(/ 54 180) pi))) 2) ratio #f (/ pi 3)))] + [inner-pentagon-row (cadr (draw-pentagon image c-col c-row (/ (* (* 0.4 width) (sin (*(/ 54 180) pi))) 2) ratio #f (/ pi 3)))] + [outer-pentagon-col (car (draw-pentagon image c-col c-row (* 0.4 width) ratio #f (/ pi 2)))] + [outer-pentagon-row (cadr (draw-pentagon image c-col c-row (* 0.4 width) ratio #f (/ pi 2)))] + ) + + (draw-bg image fgcolor) + + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + (context-set-fgcolor! "black") + (context-set-brush! "2. Block 01") + + (context-set-fgcolor! fgcolor) + + + (context-set-brush! "Nova") + (image-select-ellipse! image REPLACE (* 0.1 width) (* 0.1 height) HR VR) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "Nova") + (draw-pentagon image c-col c-row (* 0.4 width) ratio #t (/ pi 2)) + (draw-pentagon image c-col c-row (* (* 0.4 width) (sin (*(/ 54 180) pi))) ratio #t (/ (* 3 pi) 2)) + (for-each image-draw-line! (make-list 5 image) + inner-pentagon-col inner-pentagon-row + (append (list (list-ref outer-pentagon-col 3) (list-ref outer-pentagon-col 4)) (list-take outer-pentagon-col 3)) + (append (list (list-ref outer-pentagon-row 3) (list-ref outer-pentagon-row 4))(list-take outer-pentagon-row 3))) + (for-each draw-central-circles (make-list 5 image) (make-list 5 2) + (map (r-s - (* width 0.03)) inner-pentagon-col) + (map (r-s - (* height 0.03)) inner-pentagon-row) + (map (r-s + (* width 0.03)) inner-pentagon-col) + (map (r-s + (* height 0.03))inner-pentagon-row)) + (cond [(not (= 0 snum)) + (for-each draw-central-circles (make-list 5 image) (make-list 5 snum) + (map (r-s - (* width 0.06)) outer-pentagon-col) + (map (r-s - (* height 0.06)) outer-pentagon-row) + (map (r-s + (* width 0.06)) outer-pentagon-col) + (map (r-s + (* height 0.06)) outer-pentagon-row))]) + (cond [(not (= 0 tnum)) + (draw-central-circles image tnum (- c-col (* 0.1 width)) + (- c-row (* 0.1 height)) + (+ c-col (* 0.1 width)) + (+ c-row (* 0.1 height)))]) + (roman-num image (* 0.5 width) (* 0.9 height) (* 0.03 (+ width height)) ratio fnum) + (image-refresh-display! image) + (image-show image)))) + + + +;;;;;;;;;;;;;;;;;;;;;;;magic 5;;;;;;;;;;;;;;;;;;;;;; + +;;;Procedure:draw-poly +;;;Parameter:image, an image +;;; h, an integer, the x coordinate of the central +;;; k. an integer, the y coordinate of the central +;;; R, a positive number, the radius of the circle which contain the squares +;;; m, a positive integer between 0 and 9 +;;; a, a positive number, the start angle +;;; ratio, a positive numebr, image's width/height +;;;Purpose: draw-polyons, with m+3 edges and a certain pattern +;;;Produce:nothing +(define draw-poly + (lambda (image h k R m a ratio) + (let* ([in (/ (* 2 pi) m)] + [create-point (lambda (n) + (cons (+ h (* R (cos (+ (/ pi 2) (* n in))))) + (- k (* R (sin (+ (/ pi 2) (* n in)))))))] + [create-points (map create-point (iota m))] + [my-points (let kernel ([i 0] + [cur-points '()]) + (cond [(>= i m) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (cons (+ (* h (- 1 ratio)) (* (car (list-ref create-points i)) ratio)) + (cdr (list-ref create-points i))) + cur-points))]))] + + [in* (/ (* (- m 2) pi) m)] + [r (* 2 R (sin (/ pi m)))] + [s (* r (/ (sin (- in* a)) (sin (- pi in*))))] + [create-point* (lambda (n) + (cons (+ (car (list-ref create-points n)) + (* s (cos (+ (* 1.5 pi) (- (/ in* 2)) a (* n (- pi in*)))))) + (- (cdr (list-ref create-points n)) + (* s (sin (+ (* 1.5 pi) (- (/ in* 2)) a (* n (- pi in*))))))))] + [create-points* (map create-point* (iota m))] + [my-points* (let kernel ([i 0] + [cur-points '()] + ) + (cond [(>= i m) + (reverse cur-points)] + [else + (kernel (+ i 1) + (cons (cons (+ (* h (- 1 ratio)) (* (car (list-ref create-points* i)) ratio)) + (cdr (list-ref create-points* i))) + cur-points + ))]))]) + (image-select-polygon! image REPLACE my-points) + (image-stroke-selection! image) + (image-select-nothing! image) + (let kernel2 ([i 0]) + (when (< i m) + (image-draw-line! image (car (list-ref my-points i)) + (cdr (list-ref my-points i)) + (car (list-ref my-points* i)) + (cdr (list-ref my-points* i))) + (kernel2 (+ i 1)))) + (let kernel3 ([i 0]) + (when (< i m) + (image-draw-line! image (car (list-ref my-points i)) + (cdr (list-ref my-points i)) + (/ (+ (car (list-ref my-points* (remainder (+ i 1) m))) + (car (list-ref my-points (remainder (+ i 1) m)))) 2) + (/ (+ (cdr (list-ref my-points* (remainder (+ i 1) m))) + (cdr (list-ref my-points (remainder (+ i 1) m)))) 2)) + (kernel3 (+ i 1)))) + (let kernel4 ([i 0]) + (when (< i m) + (image-draw-line! image (car (list-ref my-points i)) + (cdr (list-ref my-points i)) + (/ (+ (/ (+ (car (list-ref my-points* i)) + (car (list-ref my-points i))) 2) + (car (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (/ (+ (cdr (list-ref my-points* i)) + (cdr (list-ref my-points i))) 2) + (cdr (list-ref my-points (mod (- i 1) m)))) 2)) + (kernel4 (+ i 1)))) + (let kernel5 ([i 0]) + (when (< i m) + (image-draw-line! image (/ (+ (/ (+ (car (list-ref my-points* i)) + (car (list-ref my-points i))) 2) + (car (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (/ (+ (cdr (list-ref my-points* i)) + (cdr (list-ref my-points i))) 2) + (cdr (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (car (list-ref my-points i)) + (car (list-ref my-points (mod (- i 1) m)))) 2) + (/ (+ (cdr (list-ref my-points i)) + (cdr (list-ref my-points (mod (- i 1) m)))) 2)) + (kernel5 (+ i 1))))))) + + + +;;;Procedure:draw-magic-circle5 +;;;Parameter:num, an positive integer between 1~999 +;;; width, a positive number, width of the image +;;; height, a positive number, height of the image +;;;Purpose: to draw the first magic circle, +;;; hundres digit determines the number of edges of the polygon (N+3) +;;; tens digit determines the number of the roman number showed at the top of the magic circle +;;; unit digit determines the number of the roman number showed as the backgroud of the magic circle +;;;Produce:magic-circle5, an image +(define draw-magic-circle5 + (lambda (num width height) + (let* ([nums (split-num num)] + [fnum (car nums)] + [snum (cadr nums)] + [tnum (caddr nums)] + [image (image-new width height)] + [tommy (turtle-new image)] + [HR (* 0.8 width)] + [VR (* 0.8 height)] + [ratio (/ width height)] + [c-col (/ width 2)] + [c-row (/ height 2)] + [fgcolor (generate-color fnum)] + [in* (/ (* (+ fnum 1) pi) (+ fnum 3))] + ) + + (draw-bg image fgcolor) + + + (context-set-fgcolor! (irgb-lighter (irgb-lighter fgcolor))) + (context-set-brush! "Star Brush #2") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col1)) + (map ceiling (map (l-s * (/ height 25)) star-row1))) + + (context-set-fgcolor! "white") + (for-each image-blot! (make-list 25 image) + (map ceiling (map (l-s * (/ width 25)) star-col2)) + (map ceiling (map (l-s * (/ height 25)) star-row2))) + + + (context-set-fgcolor! "black") + (context-set-brush! "2. Block 01") + (roman-num image c-col c-row (/ VR 2) ratio tnum) + + (context-set-fgcolor! fgcolor) + + + (context-set-brush! "Nova") + (image-select-ellipse! image REPLACE (* 0.1 width) (* 0.1 height) HR VR) + (image-stroke-selection! image) + (image-select-nothing! image) + + + (context-set-brush! "GIMP Brush #1") + (image-select-ellipse! image REPLACE (* 0.14 width) (* 0.14 height) (* HR 0.9) (* VR 0.9)) + (image-stroke-selection! image) + (image-select-nothing! image) + + (context-set-brush! "Nova") + (draw-poly image c-col c-row (/ (* 0.7 height) 2) (+ fnum 3) (* snum (/ in* 20)) ratio) + (roman-num image c-col (- c-row (/ VR 2)) (/ VR 20) ratio snum) + + + (image-refresh-display! image) + (image-show image)))) + + + diff --git a/sketch.odt b/sketch.odt deleted file mode 100644 index c27ab1b..0000000 Binary files a/sketch.odt and /dev/null differ diff --git a/titus.jpg b/titus.jpg new file mode 100644 index 0000000..6b85516 Binary files /dev/null and b/titus.jpg differ diff --git a/general.rkt b/tree.rkt similarity index 100% rename from general.rkt rename to tree.rkt