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

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

; flip-vertical :: Image -> Image ; flip-horizontal :: Image -> Image

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

Example: Does flip-vertical distribute over beside?

Circle of Evaluation

(flip-vertical (beside yellow-rect blue-ellipse))

(beside (flip-vertical yellow-rect) (flip-vertical blue-ellipse))

Sketch

a yellow rectangle is positioned to the left of a blue ellipse

a yellow rectangle is positioned to the left of a blue ellipse

Did both expressions produce identical images in WeScheme? Is flip-vertical distributive over beside?

1 Does flip-horizontal distribute over beside?

Circle of Evaluation

(flip-horizontal (beside yellow-rect blue-ellipse))

Sketch

a blue ellipse to the left of a yellow rectangle

Did both expressions produce identical images in WeScheme? Is flip-horizontal distributive over beside?

2 Does flip-vertical distribute over above?

Circle of Evaluation

(flip-vertical (above yellow-rect blue-ellipse))

Sketch

a blue ellipse on top of a yellow rectangle

Did both expressions produce identical images in WeScheme? Is flip-vertical distributive over above?

3 Does flip-horizontal distribute over above?

Circle of Evaluation

(flip-horizontal (above yellow-rect blue-ellipse))

Sketch

a yellow rectangle is positioned on top of a blue ellipse

Did both expressions produce identical images in WeScheme? Is flip-horizontal 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.