CS 151: Thinking Geometrically

Title image Project 2
Fall 2018

Thinking Geometrically

The goal of the next couple of assignments is to get you thinking about processes, organization, and taking advantage of repetition and the use of variables in place of hard numbers. The latter, in particular, is a form of generalization. If you can use variables instead of numbers, then a single function can serve many purposes.

The following is a quick note on one way of thinking about making an aggregate shape, which is a more complex shape that is made out of simpler shapes. In the case below, a chair, or bench, is made from three blocks. The challenge is to describe the relative location of the blocks in such a way that the function will draw the chair appropriately no matter the location or size.

The process is as follows.

Back to the assignment...