Broad Computer logo

Source: Internet
Author: User

#-*-coding:gb2312-*-import randomimport turtlet=turtle. Pen () T.color (' Blue ') Sc=t.getscreen () Sc.title ("Gzhu-computer Science & Educational Software") ################## # # #设定标准长度, used to adjust the size of the entire graph Len = 130#################### #def drawout (): #################### #描绘外环 t.shape (' turtle ') t.b Egin_fill () t.circle (Len) T.end_fill () t.color (' White ') t.up () t.lt (All) t.fd (len*0.17) t.rt (+) T.    Down () T.begin_fill () t.circle (len*0.83) T.end_fill () T.fillcolor (' Blue ') ################### #def DrawIn1 (): ################### #内部图形的大小设定 Dlen = 0.1*len ################### #画多边形的分步函数 def Ring (): T.FD (dlen*0.6) #开始画 Arrow t.lt (T.FD) (DLEN/2) t.rt (135) T.FD (Dlen) t.rt (All) t.fd (Dlen) t.rt (13 5) T.FD (DLEN/2) t.lt () t.fd (dlen*0.6) t.lt (+) T.FD (dlen*6) #开始多边形画长直线 ############ ####### #画多边形的总函数 def drawring (): Ring () t.lt ################### #进入内环, openThe beginning depicts the polygon T.color (' Blue ') t.up () t.lt (a) t.fd (dlen*1.8) T.down () t.lt () T.begin_fill () t.fd (dlen*6    ) #多边形长直线 t.lt (All) drawring () drawring () drawring () drawring () drawring () drawring () T.end_fill () ################### #去到E外面的环 t.fillcolor (' White ') t.lt (153) T.FD (len*0.18) t.rt (+) T.color (' White ') T. Begin_fill () t.circle (len*0.43) T.end_fill () ################### #调整E的大小eLen = len*0.6################### #画E的函数def Dr            AwE (angle): Def e (): T.FD (ELen) t.rt (All) t.fd (elen*0.3) t.rt (All) def e (): T.FD (elen*0.7) t.lt () t.fd (elen*0.2) t.lt (All) t.fd (elen*0.7) T.R        T (+) E () t.fd (elen*0.3) t.rt (+) e () t.fd (elen*0.2) t.rt (T.FD) ELen T.rt (T.FD) (elen*1.15) ##################### #开始画E t.color (' Blue ') t.up () if angle==1:t    . Circle (len*0.43,-90)T.lt (T.FD) (len*0.38) t.lt (All) t.fd (len*0.47) t.rt (123) T.down () T.begin_fill () E () T.end_fill () ##################### #################### #解决图像消失太快问题def Drawdelay (d): T.up () t.circle (d) #################### #t.    Speed (1) drawout () DrawIn1 () Drawe (0) t.ht () Drawdelay (+) T.clear () t.up () T.home () T.down () while True:sc.tracer (2) Drawout () t.circle (len*0.83,90) DrawIn1 () Drawe (1) sc.tracer (1) drawdelay (1) t.clear () t.up () T.ho Me () T.down () Sc.tracer (2) drawout () DrawIn1 () Drawe (0) sc.tracer (1) drawdelay (1) t.clear () t.u P () T.home () T.down () ######################

  

Broad Computer logo

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.