Hello reader. In my second project, I was given the goal of creating scenes using aggregate shapes - that is, shapes that are created using definitions for other, simpler shapes embedded within them. Another goal was to be able to create scenes that could be scaled and placed at any point on the screen. That the programmer could change the scale and position of the picture solely by changing one number when finally calling the scene.
I first created a bunch of basic scalable shapes (using my knowledge learned from the last project) that I could later use to create my aggregate shapes.
I then used these scalable shapes together to create bigger aggregate shapes. I also added some color. Here is my basic representation of this picture of Chicago.
Pretty cool, huh? This image is scalable and can be placed at any point on the screen simply by changing a number when calling the function. That is, I included the scale throughout the construction of the aggregate shapes.
Next, I created an ocean scene.
What's cool about the both of these images is that a) they are both scalable and manipulable when they are finally called and b) the locations and sizes of the fish and seaweed in the ocean picture and the trees in the Chicago picture are generated by a random function in python. That is, I set reasonable parameters which allowed the program to generate the sizes and locations, and the computer did so at it's own will.
This project taught me how to create aggregate shapes, and how to let the computer generate random numbers within reason. Additionally, I gained more control of for loops, which I used to create the many fish, trees, seaweed, and windows on the buildings in Chicago.
Thanks to Lanya for teaching me how to use turtle.tracer(false) to not have to wait for images to appear and to Professor Taylor for helping me out with a for loop problem I was having while creating windows on my buildings.