Cafe Wall Illusion

You will create the illusion below:

Cafe Wall

Problem 4.1: Create Your Illusion

In this illusion, all of the lines are parallel, even though they don’t appear to be!

You should create a function that returns a MiddImage with a cafe wall illusion:

def optical_illusion(im):
    """
    Your docstring goes here!
    """
    # your code goes here!

You will probably find it useful to use one of the functions that you created earlier for this assignment: filled_rectangle.

Your function must work with the size of im that is used in the test function. You must use loops in your code, do not hard-code individual pixels!

Problem 4.2: Set the ILLUSION Variable

In order to identify which illusion you have created, set the variable in your code as follows:

ILLUSION = "cafe_wall"

Problem 4.3: Reflection

Please answer the following question under the header Problem 4.3: illusion reflection:

How many time did you call the fill_rectangle function in your code? Base your answer on the image that is generated using the test function call in hw5.py.