Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2) Because I wanted just more than stars as background ingredients for space, I wanted to draw blackhole.  The end-result does not like real blackhole, but it uses loop control function and creates an interesting image.  At first, I simply made a line drawing bigger circles, which I expected to illustrate a sort sucking-hole image.  But it did not.  Thus, I switched to using one of my basic shapes, semi-circle, and made it rotate around its starting point by 10 degrees 36 times.(36*10=360 degrees).  This result looked a lot better, so I included in my extension.

.  Doesn't the black hole circle in the center look like it's absorbing the surroundings?

 

3) I already mentioned using random.randint command.  One advantage of this random command is that I can now set different ranges for different parameters.  This can be useful when setting different locations/ranges for different shapes.

 

4&5) In order to add more parameters and use other turtle properties, I simply had to edit my original codes for aggregate shapes.  Image Added

For a tip, once the number of parameter starts to increase, it becomes easier to forget to include them when calling the functions.

Regarding using color randomly, I actually borrowed the codes from this website:https://trinket.io/python/f0a2314bf3.  The idea is quite simply.  Create a variable 'color' which has different values, i.e. colors.  Then use random.choice(color), which is one of the random packages, to draw with different colors.  Although I am not sure whether this is the most efficiency way to paint in different colors, this is surely one way to do so.  Image Added

 

6) Below is the final image, which uses almost all of my shapes: stars, space-ships, satellites, blackholes, and rockets with different colors and pen width at different locations.