We saw how to draw a square, and a rectangle with different sides. Now, we return to our house example p. § and
we’re going to modify the code to draw this house at any chosen scale.
The objective is to send an argument to the procedure house and according to this parameter, the house will be
smaller or bigger.
In real size, the procedure square was:
All the initial dimensions are multiplied by the scale. Hence, the procedure square becomes:
Therefore, when we’ll write square 2, the square will have for side length 150 × 2 = 300. Proportions are well
respected! In fact, we can see that we just need to modify all procedures replacing the length according to this rule:
fd 70 becomes fd 70*:c
fd 45 becomes fd 45*:c