2017-09-11 5 views
-1

私はPython turtle graphicsを使って以下の画像をデザインしようとしています。Python turtle graphicsでこのロゴプロジェクトを完成させよう

enter image description here

これまでのところ、これは私が出ているものです。

enter image description here

は、ここに私のコードスニペットです。

from turtle import Turtle 
t=Turtle() 
t.hideturtle() 
t.speed(0) 

def text(): 
    t.color("blue") 
    t.write("AOL",align="center",font=("Adobe Gothic Std B",100,"bold")) 

def circle_with_color_fill(): 
    t.up() 
    t.setpos(200,50) 
    t.down() 
    t.color("blue") 
    t.begin_fill() 
    t.circle(40) 
    t.end_fill() 

def circle(): 
    t.up() 
    t.setpos(200,40) 
    t.down() 
    t.color("blue") 
    t.circle(50) 

text() 
circle_with_color_fill() 
circle() 
t.screen.mainloop() 

どのように私はこれらの三角形を得ることができますか?

答えて

0

テキストが出てきましたので、ここではスタンピングを使用して、ロゴの概算だ:

from turtle import Turtle, Screen 

STAMP_UNIT = 20 

screen = Screen() 

aol = Turtle(shape='triangle', visible=False) 
aol.color('blue') 
aol.turtlesize(140/STAMP_UNIT) 
aol.stamp() 

aol.shape('circle') 
aol.turtlesize(80/STAMP_UNIT, outline=12) 
aol.color(screen.bgcolor(), 'blue') 
aol.stamp() 

screen.exitonclick() 

OUTPUT

enter image description here

関連する問題