Draw Mondrian Art with coding at www.wescheme.org
Mondrian Art Example 2
The graphic image below right was created by the programming code on the left. See below image for complete copy of the code.
Actual editable code http://tinyurl.com/mondrian-ex2
;;Coding Mondrian like art (image 2)
;;This code is written to run in WeScheme programming environment
;;any word/s after semicolon is a comment, when you press enter the next lines begins as code;;create background rectangle
(define blank (rectangle 400 400 "solid" "black"))
;;To create a graphic image, think about layering from the bottom up.
;;This means that the last item drawn will be the first "put-image" command
;;
;;Horizontal line1
(define Mond2
(put-image (rectangle 0 0 "solid" "black") 20 20
;;Horizontal line2
(put-image (rectangle 380 8 "solid" "black") 200 90
;;Horizontal line3
(put-image (rectangle 380 8 "solid" "black") 200 180
;;Horizontal line4
(put-image (rectangle 152 8 "solid" "black") 246 35
;;Vertical line1
(put-image (rectangle 7 380 "solid" "black") 230 200
;;Vertical line1
(put-image (rectangle 10 380 "solid" "black") 175 200
;;Vertical line2
(put-image (rectangle 8 166 "solid" "black") 325 93 ;;blue block
(put-image (rectangle 62 95 "solid" "blue") 360 135
;yellow block
(put-image (rectangle 52 90 "solid" "yellow") 200 138
;;red block
(put-image (rectangle 160 137 "solid" "red") 90 320
;;white block
(put-image (rectangle 390 390 "solid" "white") 200 200
blank))))))))))))
Mond2