Compare commits

...

3 Commits

Author SHA1 Message Date
mbhatti4
86be12d7f9 submit 5:
I decided to get slightly more detailed. I adjusted the colors to make it cuter.
I then added attenae to add the final touch. I was even able to add a little dot at the end to make it cuter.
I then attdjsuted the size of the pen to make the drawing more solid.

I had to look up how to hide the pen because I think it is distracting to look at. I also looked up how to mkae the turtle draw the drawing at the fastest speed.
Both of those things helped me greatly!

I am now done with the project. I definitely couldve done more but due to time, and starting late, I am still happy with how much I got done.
I was ableto learn a lot doing this project!
2025-10-05 17:50:20 -04:00
mbhatti4
5b816196e8 Submit 4:
I made the wings and body line up correctly to make a butterfly.
This took a lot of trial and error. Getting the starting coordinates and angels for each wing was very time consusming, but with each edit, it got better and better!
I also sped up the turtle because it was so slow when I was continoussly trying to see the new drawing.
I was able to use 'command ?' to help me do one wing at a time!

Somewhere i got stuck was just understadning the coordinates or angles. To help with that, I looked up the corrodinate grid to help me better select the starting point.
2025-10-05 17:28:15 -04:00
mbhatti4
f19bae7994 Submit 3:
Here i wrote the code for drawing the full butterfly by calling the other functions. I just put temprorary values to just get the program to work for now.
I will be asjusting it next submit.
I also realized why it wasnt working before..i never called any function! The program now works, but need adjustments.

I struggled with the bakground color so i simply looked up how to choose a background color on python on google and found an easy solution.
2025-10-05 16:56:16 -04:00
2 changed files with 57 additions and 11 deletions

View File

@@ -12,9 +12,13 @@ I will be making a butterfly fluttering its wings. The view will be from the fro
(Include your planning here, including your project milestone.)
### Milestone 1
Create function for the most used shapes in the project. This will include an oval, rectangle and triangle function. I will also have a fly fucntion that will help when i begin drawing.
Create function for the most used shapes in the project. This will include an oval and wing function that uses the ovals.
### Milestone 2
Create background. I want to have a solid color background.
Create a function that actually draw the body of the butterfly using the other functions I wrote prior.
### Milestone 3
Create a function that draws the wings of the butterfly using the other functions.
### Milestone 4
Change the bakground color.

View File

@@ -9,11 +9,12 @@ from turtle import *
from turtle import forward, right
from superturtle.movement import fly, no_delay
fly(-150, 150)
with no_delay():
for i in range(720):
forward(300)
right(71)
import turtle
screen = turtle.Screen()
screen.bgcolor("lightblue")
turtle.speed(0)
def draw_oval(width, height, color):
fillcolor(color)
@@ -28,14 +29,55 @@ def draw_wing(x, y, width, height, color, angle):
goto(x, y)
setheading(angle)
pendown()
draw_oval(t, width, height, color)
draw_oval(width, height, color)
def draw_body():
penup()
goto(0,-100)
setheading(90)
goto(0,25)
setheading(135)
pendown()
draw_oval(10,45,"black")
draw_oval(10,100,"black")
def draw_butterfly():
draw_wing(-10,-40, 50, 120, "indianred",50)
draw_wing(-10,-75, 40, 90, "palevioletred", 60)
draw_wing(10,25, 50, 120, "indianred",220)
draw_wing(10,-30, 40, 90, "palevioletred", 210)
draw_body()
def draw_a():
penup()
goto(-7,25)
pendown()
pensize(3)
color("black")
setheading(100)
circle(65,80)
pensize(8)
forward(1)
penup()
goto(-7,25)
pendown()
pensize(3)
setheading(80)
circle(-65,80)
pensize(8)
forward(1)
penup()
pensize(5)
hideturtle()
draw_butterfly()
draw_a()
input()