From 1a09cc4b183cb0143c8b357e7a01cb8b84d5a70a Mon Sep 17 00:00:00 2001 From: Seoyeon Lee Date: Sat, 28 Sep 2024 21:41:24 -0400 Subject: [PATCH] From a rectangle to a circle (yin yang kind shape) I failed multiple times. Making the red (upper part of circle) was fairly easy. But, another half with blue was harder than I thought. While I was expereincing some failures, I got a new idea. I wanted to create a new identical upper circle shape and rotate it to put it under the red upper circle, but I don't know how to do rotate the identical new figure using the point the pen stops as a center of rotation. I don't know if it's even possible. So, I just keep trying my original plan, which was just using a big half circle and two half circles. --- drawing.py | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/drawing.py b/drawing.py index c0aa56b..c880ed2 100644 --- a/drawing.py +++ b/drawing.py @@ -2,31 +2,26 @@ # ---------- # By Seoyeon___________ # -# (basic practice prior to yin-yang shape.) +# (center of Korean flag with two colors, red and blue) -from turtle import * +from turtle import * +r=40 +left(70) color("black", "red") begin_fill() -forward(40) -right(90) -forward(20) -right(90) -forward(40) -right(90) -forward(20) +circle(r,180) # half circle +circle(-r,180) # another half circle +circle(-r*2,180) end_fill() -penup() -backward(20) -right(180) -color("black","blue") +color("black", "blue") begin_fill() -forward(20) -left(90) -forward(40) -left(90) -forward(20) -end_fill() +circle(-r*2,180) +right(180) +circle(r,180) # half circle +circle(-r,180) # another half circle +end_fill() input() +