generated from mwc/project_drawing
Added and tested two functions to create ellipses
So far the biggest sticking point has been the planning, mostly from the standpoint of designing a drawing that I will realistically be able to create with turtle. I want to make a dog, so I was going to make a pointer (my dog) holding point, but the curves were complex and I couldn't quite figure out how I wanted to integrate iteration into that design. I've since decided on a dog's face, where I can use a lot of the same shapes in a variety of locations, so I'm hoping that continues to work. The ear() and face() functions that I have right now generate two different forms of ellipses, one sort of football-shaped, the other much longer and narrower, proportionally.
This commit is contained in:
parent
e28deac321
commit
8cc5090b5f
28
drawing.py
28
drawing.py
|
@ -1,7 +1,31 @@
|
|||
# drawing.py
|
||||
# ----------
|
||||
# By ____(you)___________
|
||||
# By Patrick Wick
|
||||
#
|
||||
# (Briefly describe what this program does.)
|
||||
# This program will (hopefully) draw a dog
|
||||
|
||||
from turtle import *
|
||||
import superturtle as st
|
||||
|
||||
# for the dog's ears
|
||||
def ear(rad):
|
||||
|
||||
# draw an ellipse, rad is the "radius" of the ellipse
|
||||
for i in range(2):
|
||||
# two arcs, each one half of the ellipse
|
||||
circle(rad,90) # long side
|
||||
circle(rad//25,90) # short side
|
||||
|
||||
# main part of the dog's face
|
||||
def face(rad):
|
||||
|
||||
# draw an ellipse, rad is the "radius" of the ellipse
|
||||
for i in range(2):
|
||||
# two arcs, each one half of the ellipse
|
||||
circle(rad,90) # long side
|
||||
circle(rad//2,90) # short side
|
||||
|
||||
face(100)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue