
In this project, you will practice using functions to make a everyday scene made up of simple and compound shapes that you design inspired by the Alex Katz exhibition at the Colby Art Museum. It can be inspired by the content or color palette of a painting. You have wide latitude in your choice of subject, and the scene can be as simple or complex as you like. What is important is to properly structure your code and include good comments.
To help you flexibly use your shapes in your dream space scene, you will take advantage of functions with offsets and scales to place your shapes in any position and at any scale.
The goals of this project reinforce those from lab:
Extension points are awarded for complex scenes, especially those that show me that you can integrate concepts from lecture into making your scenes and take things to the next level!
First, go to the Alex Katz exhibition at the Colby Art Museum. Think about how Katz uses bold simple shapes and fields of color to represent people, and landscapes. Look at the way that the subject of the paintings use the space of the canvas. Take a picture of one of the paintings (without flash!) and write down the name of the painting.
Include a photo of an artwork from the Alex Katz exhbition as part of your report.
Think about an image you want to create inspired by current Alex Katz exhibition at the Colby Art Museum. Design the scene on paper as a collection of complex objects from everyday life, like people, trees, flowers, etc. Come up with at least 3 complex objects of your own that you want to create for your scene. Think about what shapes you would need to create the complex objects.
In your report section called Art Reflection discuss which painting(s) inspired you and what aspects of the compositions you emulated.
Include a photo of your design document as part of your report.
shapelib.py: it will store all the functions that you write to draw different shapeslab2.py and name it shapelib.py. This will be your shape library — it will store all the functions that you write that draw different shapes. You will need to turn in lab2.py so that it can be graded; do not modify your code from lab without making a copy!shapelib.py so that it only has import statements and function definitions.goto functionIf you haven't already in lab, add a call to the setheading turtle function in your goto function in shapelib.py, so that the turtle always faces east when you call goto (We are using "standard mode").
This may be helpful when you create your scene because you will know the turtle is always facing east when it moves to draw a new shape.
main.py file: it will store functions that you write to draw your scenemain.py.import shapelib).shapelib.<function> every time you want to call a shape function, you can instead use the import shapelib as <something> trick to use an abbreviated name.testScene. As the name suggests, this function is only a test to make sure you are able to access your shapes in another file. Call one of your shape functions in the function (e.g. triangleStack). shapelib.py, not main.py!testScene function at the end of the file as main code, followed by a call to exitonclick.main.py and make sure that the turtle draws the expected shape. You don't need to save this image; it is only a test.shapelib.pyThey could be shapes like a rectangle, non-equilateral triangle, n-gon, etc (turtle.circle() doesn't count). Each function should minimally take parameters for:
width and height, in pixels.Some important guidelines:
Test out each of your functions one-by-one as you make them. This means calling your two shapes in main code at the bottom of main.py several times to draw each in a few different positions and sizes.
Create a test function for each shape called shapeA_test and shapeB_test. The test function should draw the shape in different locations at different sizes, showing that the shape can be drawn at any scale or size.
For each test function, take a screenshot of the results it produces. These are Required Images 1 and 2 that you should include and describe in your written report.
Keep the test functions but comment out the function calls after taking a screen shot.
shapelib.pyThese should be things you see around campus (e.g. buildings, people, trees, etc.). The objects should be built from at least two of your simple shapes (e.g. triangles, rectangles, etc.) from your shape library.
Just like triangleStack from lab, your compound shape functions should take at least three parameters:
Remember the process for designing complex shapes:
(x, y). Convert the remaining shape positions to offsets.scale parameter to sizes and offsets, not positions.Your shapes should draw properly at any scale, location, or turtle orientation.
Create a test function for each compound shape called compound_shape1_test and compound_shape2_test. The test function should draw the compound shape in different locations at different sizes, showing that the compound shape can be drawn at any scale or size.
For each test function, take a screenshot of the results it produces. These are Required Images 3 and 4 that you should include and explain in your written report.
Keep the test functions but comment out the function calls after taking a screen shot.
Write your code in a function called scene1 in main.py. It should use the simple and compound shapes that you have made — drawing them in different positions and sizes.
Take a screenshot. This is Required Image 5 that you should include in your report.
In order to grade your project, we need to be able to run your code and get the same results as you do! Here is a summary of the expected outputs from each of the source code files that you created (i.e. by running python3 <filename>.py):
shapelib.py: Nothing. Your shapelib.py should have test functions but they are NOT called at the global scope. main.py: Your artwork scene.Congratulations on completing the core tasks! Between the code that you’ve already written and the report that you write, you’ve already earned up to 26/30 points for this project. If you turn it in by the first deadline that's 27/30 points.
The remaining 3/30 are a chance for you to earn credit for exploring parts of this project and digging deeper to express your creativity! This is entirely optional; 27/30 is an A- and is a perfectly respectable place to stop. Extensions are open-ended and exist to compliment the structured core project. Explore and learn something new that interests you! Concentrating your energy on 2 "deep" extensions that challenge you will earn you more points than many small, "shallow" extensions.
Make sure that your extensions do not break your base project code. A great way to do this is to create extenion_shapelib.py and extenion_main.py files.
You can pick your own topics that interest you. Here are a few examples:
To get credit for your extensions, you must document them in your report. For each extension this includes:
To turn in your project, make sure you do all of the following:
hewolfe_Project2.zip.© 2021 Hannen Wolfe and Oliver Layton