Open the Distributive Property Starter File, which you will use to investigate four functions:

; beside :: Image, Image -> Image ; above :: Image, Image -> Image

; rotate :: Number, Image -> Image ; scale :: Number, Image -> Image

What image operations can be distributed? Follow the example in the table below.

Example: Does scale distribute over beside?

Circle of Evaluation

(scale 0.5 (beside aqua-star orange-dot))

(beside (scale 0.5 aqua-star) (scale 0.5 orange-dot))

Sketch

an aqua star positioned to the left of an orange circle

an aqua star positioned to the left of an orange circle

Did both expressions produce identical images in WeScheme? Yes. Is scale distributive over beside? It is.

1 Does scale distribute over above?

Circle of Evaluation

(scale 2 (above orange-dot purple-square))

Sketch

an orange circle positioned above a purple square

Did both expressions produce identical images in WeScheme? Is scale distributive over above?

2 Does rotate distribute over beside?

Circle of Evaluation

(rotate 30 (beside blue-ellipse yellow-rect))

Sketch

a blue ellipse to the left of a yellow rectangle. Together, the image (of both shapes) is rotated 45 degrees.

Did both expressions produce identical images in WeScheme? Is rotate distributive over beside?

3 Does rotate distribute over above?

Circle of Evaluation

(above (rotate 45 bootstrap) (rotate 45 yellow-rect))

Sketch

Bootstrap in green text is positioned above a yellow rectangle, and then the image is rotated 45 degrees.

Did both expressions produce identical images in WeScheme? Is rotate distributive over above?

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.