Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add David Candy Cane #14

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions drawfunctions/david_akim_candycane.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
from turtle import Turtle


def draw_candycane():
turtle = Turtle()
# turtle.speed(3)
turtle.hideturtle()

# candy cane
turtle.up()
turtle.goto(100, 90)
turtle.down()
turtle.rt(-90)
turtle.circle(15, 180)
turtle.fd(50)
turtle.circle(5, 180)
turtle.fd(50)
turtle.circle(-5, 180)
turtle.circle(5, 180)
turtle.up()

# red stripe
turtle.goto(70, 70)
turtle.down()
turtle.begin_fill()
turtle.color('red')
turtle.fd(5)
turtle.rt(45)
turtle.fd(14)
turtle.rt(135)
turtle.fd(5)
turtle.rt(45)
turtle.fd(14)
turtle.end_fill()

# green stripe
turtle.up()
turtle.goto(70, 55)
turtle.down()
turtle.rt(135)
turtle.begin_fill()
turtle.color('green')
turtle.fd(5)
turtle.rt(45)
turtle.fd(14)
turtle.rt(135)
turtle.fd(5)
turtle.rt(45)
turtle.fd(14)
turtle.end_fill()

# red stripe
turtle.up()
turtle.goto(70, 40)
turtle.down()
turtle.rt(135)
turtle.begin_fill()
turtle.color('red')
turtle.fd(5)
turtle.rt(45)
turtle.fd(14)
turtle.rt(135)
turtle.fd(5)
turtle.rt(45)
turtle.fd(14)
turtle.end_fill()

# red stripe
turtle.up()
turtle.goto(90, 90)
turtle.down()
turtle.rt(135)
turtle.begin_fill()
turtle.color('red')
turtle.fd(5)
turtle.rt(45)
turtle.fd(9)
turtle.rt(135)
turtle.fd(5)
turtle.rt(45)
turtle.fd(9)
turtle.end_fill()

# green stripe
turtle.up()
turtle.goto(70, 83)
turtle.down()
turtle.rt(135)
turtle.begin_fill()
turtle.color('green')
turtle.fd(5)
turtle.rt(45)
turtle.fd(22)
turtle.rt(50)
turtle.fd(5)
# turtle.rt(130)
# turtle.fd(22)
turtle.end_fill()
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from turtle import exitonclick
from drawfunctions import dominic_duffin, david_akim, satoshi_s, teri_eyenike, david_akim_present_2024, david_akim_christmas_sock, chris_j, christina_loiacono
from drawfunctions import dominic_duffin, david_akim, satoshi_s, teri_eyenike, david_akim_present_2024, david_akim_christmas_sock, chris_j, christina_loiacono, david_akim_candycane

dominic_duffin.christmas_tree()
david_akim.star()
Expand All @@ -9,5 +9,6 @@
david_akim_christmas_sock.draw_christmas_sock()
chris_j.draw_snowman()
christina_loiacono.tree_present()
david_akim_candycane.draw_candycane()

exitonclick()