From 8cc5090b5f9a3af7385f8c8d81218780e3931795 Mon Sep 17 00:00:00 2001 From: Pat Wick Date: Sun, 23 Jul 2023 10:31:58 -0400 Subject: [PATCH] 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. --- drawing.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drawing.py b/drawing.py index 29fc89e..b9aa7c2 100644 --- a/drawing.py +++ b/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) + + +