-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add David art 2024 - Christmas present (#9)
- Loading branch information
Showing
2 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
from turtle import Turtle | ||
|
||
|
||
def draw_present(): | ||
turtle = Turtle() | ||
turtle.hideturtle() | ||
|
||
# Draw box | ||
turtle.penup() | ||
turtle.goto(60, 0) | ||
turtle.pendown() | ||
turtle.color(2, 181, 91) | ||
turtle.begin_fill() | ||
turtle.forward(30) | ||
turtle.right(90) | ||
turtle.forward(30) | ||
turtle.right(90) | ||
turtle.forward(30) | ||
turtle.right(90) | ||
turtle.forward(30) | ||
turtle.end_fill() | ||
|
||
# Draw box lid | ||
turtle.penup() | ||
turtle.goto(55, 0) | ||
turtle.pendown() | ||
turtle.color(0, 212, 105) | ||
turtle.begin_fill() | ||
turtle.forward(10) | ||
turtle.right(90) | ||
turtle.forward(40) | ||
turtle.right(90) | ||
turtle.forward(10) | ||
turtle.right(90) | ||
turtle.forward(40) | ||
turtle.end_fill() | ||
|
||
# Draw ribbon | ||
turtle.penup() | ||
turtle.goto(78, -30) | ||
turtle.pendown() | ||
turtle.color(255, 0, 0) | ||
turtle.begin_fill() | ||
turtle.forward(6) | ||
turtle.right(90) | ||
turtle.forward(50) | ||
turtle.right(90) | ||
turtle.forward(6) | ||
turtle.right(90) | ||
turtle.forward(50) | ||
turtle.end_fill() | ||
|
||
# Draw right bow | ||
turtle.penup() | ||
turtle.goto(80, 12) | ||
turtle.pendown() | ||
bow_rad = 12 | ||
turtle.width(5) | ||
for i in range(2): | ||
# two arcs | ||
turtle.circle(bow_rad, -90) | ||
turtle.circle(bow_rad//4, -90) | ||
|
||
# Draw left bow | ||
turtle.penup() | ||
turtle.goto(55, 22) | ||
turtle.pendown() | ||
for i in range(2): | ||
# two arcs | ||
turtle.circle(bow_rad, 90) | ||
turtle.circle(bow_rad//4, 90) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from turtle import exitonclick | ||
from drawfunctions import dominic_duffin, david_akim, satoshi_s, teri_eyenike | ||
from drawfunctions import dominic_duffin, david_akim, satoshi_s, teri_eyenike, david_akim_present_2024 | ||
|
||
dominic_duffin.christmas_tree() | ||
david_akim.star() | ||
satoshi_s.base() | ||
teri_eyenike.draw_shape() | ||
david_akim_present_2024.draw_present() | ||
|
||
exitonclick() |