Saint Louis University |
Computer Science 1300
|
Computer Science Department |
Try to recreate the geometry of the following sketches. The additional guidelines shown in my images designate 100-pixel increments.
Mickey (spoiler: my code)
Uses: Circle
Tree (spoiler: my code)
Uses: Circle, Rectangle
House (spoiler: my code)
Uses: Circle, Rectangle, Polygon
Snowman1 (spoiler: my code)
Uses: Circle
Snowman2 (spoiler: my code)
Uses: Circle
Propeller (spoiler: my code)
Full Disclosure: originally intended to make a flower
Uses: Circle, Ellipse
Peace (spoiler: my code)
Uses: Circle, Path, setBorderWidth
Fake Cube (spoiler: my code)
Uses: Rectangle, Polygon
Tophat (spoiler: my code)
Uses: Circle, Rectangle, Spline
Yield Sign (spoiler: my code)
Uses: Polygon, setBorderColor, setBorderWidth
Unfilled Triangle (spoiler: my code)
Uses: transparent fill color
Borderless Triangle (spoiler: my code)
Uses: having transparent (or zero-width) border
Warhol (spoiler: my code)
Uses: fill colors
Warhol2 (spoiler: my code)
Uses: fill colors
Swiss (spoiler: my code)
Uses: Polygon
Pinky (spoiler: my code)
Uses: we overlay a Circle and a Polygon to build the desired shape
Pinky2 (spoiler: my code)
Uses: A bit of trickery, since the outlined shape is not actually a
single shape. The circle border is part of the circle, but the rest of
the outline is a separate Path (that happens to coincide with the
shape of the filled Polygon)
smile (spoiler: my code)
Uses: Variety of circles, Spline for the mouth, and Text label
Need more challenge? Can you draw this?
Here is my attempt with cs1graphics:
(spoiler: my code)
And what happens if things go very wrong...