Deborah R. Fowler
VSFX 705 - Quilting
in Python
Posted pdf for VSFX 705 Spring
2013
Updated on July 9 2024
*Source from The Sampler Quilt Exercise by Julie Zelenski 2001 at nifty.stanford.edu
as well as Eric Roberts 1999, no longer online
Click here for Examples from previous quarters
Three video references exist to help you complete this exercise if you need extra help:
- Nested Loops (specific to helping with this exercise)
- Rotated Squares (intro covers IDLE, geany, shell versus file, turtle graphics, loops, functions and hints for the quilt)
- Additional video from Spring 2020 password required https://vimeo.com/407410869
Goals:
This assignment will focus on the student becoming familiar with the basic programming concepts discussed in class and implemented in Python with Turtle graphics.
Requirements:
Using turtle graphics, produce a “sampler quilt” using turtle graphics and python. The quilt will consist of five blocks, each with its own theme. Each block is repeated five times and all are arranged to form the entire quilt.
Your quilt should include five unique patterns (suggestions - flowers, simple or complex geometric shapes – see suggestions below), This quarter you will be required to integrate your initials into one of the patterns.(The patterns cannot be pre-defined images).
Start with an arrangement with each pattern in a column. 5 X 5
Next try arranging them in a table 5 X 7 that is cyclic (modulus or “remainder operator" %) will come in handy here.
4 0 1 2 3 4 0
3 4 0 1 2 3 4
2 3 4 0 1 2 3
1 2 3 4 0 1 2
0 1 2 3 4 0 1
Define the quiltRows, quiltColumns, blockSize so that the user can easily change these along with the size of each block (assume the blocks are square)
[Recursion in a block is NOT required for this assignment and is only advised once you have a version of the quilt working without.]
Considerations:
Using a nested loop will make this exercise easier. This is also an exercise in going through the submission process of handing in exercises.
Work incrementally – build one block at a time – required to use functions. Break this assignment down into individual pieces and test each individual part in isolation.
- Start early
- Think carefully about the overall program design – write up a plan – what functions, what arguments they will need
- Test your program in small pieces
- Write it so someone else is able to understand it easily
The project will be submitted to your dropbox in a folder (also called a directory) named:
F24_V705_E1_LastnameFirstname_Title/
The directory should contain the following:
- F24_V705_E1_LastnameFirstname_Quilt.py (you may submit
multiple versions labeled with the postfix .VN.py)
- F24_V705_E1_LastnameFirstname.pdf or html (a brief description of information you would like to communicate). This document is to provide a user's guide noting any extra features you have added. In future, the pdf/html will provide a breakdown with your target audience being your peers.
- F24_V705_E1_LastnameFirstname.jpg (or png) - a screen snap of
your result
Remember to test your file before handing it in!
Grading:
Clean efficient code and a cool visual are the emphasis.
Meeting the minimum specifications, 80%. To move your grade
above 80% go beyond the specifications, demonstrate exploration
and understanding. Consider using color, filled shapes, and so on
– but first get the basic assignment working.
Be creative, have fun.
See
previous student examples here
There are good examples in the documentation on turtle
graphics as well as a few others:
- https://docs.python.org/3/library/turtle.html
- http://deborahrfowler.com/PythonResources/PythonTurtle.html
- Also for a turtle demo sampling type in a cmd window:
python -m turtledemo