Versions Compared

Key

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

...

  • extension2.py: This code has a function npolygon, which obviously draws a polygon with certain number of sides.  This function uses parameter feature to draw n-polygons by setting two inputs: the length of sides and the number of sides.  I guess one needs to know basic geometry to use this fuction because one should be aware that 360/# of sides will determine the angle of the polygon.  Anyhow, this is how extension2.py looks like; it looks like a octagon because I put 8 as the # of sides.

  • extension3.py: Like extension1 and 2, this code uses loop and range function in order to repeat a certain command to create a unique graphic.  I decided to use the command circle() so that I could draw arcs instead of plain straight lines.  Although I did not have the idea of the end-result in my head when typing the codes, the shape is quite nice.(it looks like a flower?)  One thing to note is that I did put 'i' in parameter on purpose so that the length of arc would get longer each time.

Image Added

  • extension4.py: Extension4 is quite similar with shapeE in a sense that they both draw a same shape multiple times and at different locations.  Again, the result is quite different from the original shape.  One thing to note is that the original shape – pointer-looking shape – switches its angle each time in order to form a circle at the end.  This was done by loop and range function and putting specific angle.

Image Added