Jump into drawing with bootstrap code by Pamela Ossorio

Go to https://www.wescheme.org/ and sign-in with Gmail account . If you do not have a gmail acocunt, you can still click links to play in the shared projects.
Draw Lines and rectangles
Define functions to

Let's Play

Drawing Mondrian Art https://tinyurl.com/mondrian-art-2017
Design recipe for coding:

Design Recipe1

Description

Draw a rectangle of a given width and height in pixels

Contract/Purpose statement

Function name

Domain

Range

rectangle

number number string string

image

Examples

Example 1

(rectangle 400 400 "solid" "White")

Example 2

(rectangle 100 250 "outline" "blue")

Definition

rectangle  (width height style color)



Design Recipe 2

Description

Draw a canvas

Contract/Purpose statement

Function name

Domain

Range

blank

rectangle

image

Examples

Example 1

(define blank (rectangle 100 100 "solid" "white"))

Example 2

(define blank (rectangle 100 100 "solid" "white"))

Definition

(define fcn-name (rectangle width height style color))

 

Actual wescheme coding syntax:

(define blank (rectangle 400 400 "solid" "white"))


Design Recipe 3

Description

Place rectangle at a specific location on canvas

Contract/Purpose statement

Function name

Domain

Range

put-image

rectangle

image

Examples

Example 1

(put-image (rectangle) 200 360)

Example 2

(put-image (rectangle) 150 350)

Definition

(put-image (rectangle width height style color) x y)

 

Actual wescheme coding syntax:

(define Mond-example

(put-image ( ...) x y
(put-image ( ...) x y
(put-image ( ...) x y
(put-image ( ...) x y

...blank)))))

add ")" for each additional put-image command added

 

Links to resources

Recommended tutorial: http://www.bootstrapworld.org/materials/fall2015/HourOfCode/

   

IDE

http://www.wescheme.org/

Bootstrap logo

Curriculum Resources

http://www.bootstrapworld.org/