Solve these functions with nested image-range code. There is no decomposition on these; it's just one function per problem. We'll hand out other parts of HW2 on Fri, and all parts will be due Wed Jan 21st at 11:55pm.
a. borders()
For this problem, create a blue output image with the call
SimpleImage.blank(width, height, 'blue')
Copy the input image to the center of the output image, leaving 20 pixels margin at the left and right sides of the input image and 10 pixels margin at its top and bottom. The output image should be larger than the input image to leave space for the margins.
The output should look like:
b. reflect() (click for problem description)
Parts (c) and (d) use the parameter technique which is in the Friday lecture. There's an example at the end of lecture-5 if you want to read ahead. The function call SimpleImage.blank(..., 'blue') is a handy technique to make a blank image filled with a color, as used in part (a) above. However, that is not the technique we want you to use for (c) and (d) below. For parts (c) and (d), as We want you to write the loop logic to build the colored areas yourself. This also avoids some wasteful pixel setting.
c. hat()
d. purple()
Turn In HW2a to Paperless