The key concepts for this project were as follows: 1) parameter and 2) user-controlled scenes. Parameter was essential to drawing a scene within a scene as I needed to control of scale of each scene. Through parameter, I was able to color the shapes and fill them with color. Another key concept, user-controlled features allow users to control some aspects of my shapes or scenes by using the sys package. I needed to incorporate this into my shape; what I ended up doing was to allow users to choose the number of stars in my scenes.
Below is an image of my scene drawn at three different locations with three different sizes.
. (Required Image 1)
Now I am ready to nest this scene into another one.
First, I needed to come up with a bigger scene, which would include my scene above. I decided to draw a scene of spaceship's cockpit(call it Apollo 13). When designing the cockpit, I made a mistake not to use my basic shapes to draw it. It was a mistake because the basic shapes would have been much easier to fill with color. My codes became really complicated like below.
I had to use turtle.up() several times because I wanted to fill certain parts of my scene with color. If my scene consisted of different basic shapes, filling work could have been much simpler.
The nested image is as below.
Image Added(Required Image 2).
Now my space 2 & extension scene from my previous project are shown through windows of Apollo 13 cockpit.
As I wrote in the beginning, I allowed users to control the number of stars in my inside scenes by using the sys library. See the snippet below.
Image Added. N=50 simply means if there is no user input on terminal, python will automatically draw 50 stars.
The two images below each have 10 and 50 stars using the codes above.
Image Added(Required Image 3). Image Added(Required Image 4). I added colors to my radar screen and buttons as well.