源码:
import turtle
def drawNose ( ) :
turtle. pu( )
turtle. goto( - 100 , 100 )
turtle. pd( )
turtle. seth( - 30 )
turtle. begin_fill( )
a= 0.4
for i in range ( 120 ) :
if 0 <= i< 30 or 60 <= i< 90 :
a= a+ 0.08
turtle. lt( 3 )
turtle. fd( a)
else :
a= a- 0.08
turtle. lt( 3 )
turtle. fd( a)
turtle. end_fill( )
turtle. pu( )
turtle. seth( 90 )
turtle. fd( 25 )
turtle. seth( 0 )
turtle. fd( 10 )
turtle. pd( )
turtle. pencolor( 255 , 155 , 192 )
turtle. seth( 10 )
turtle. begin_fill( )
turtle. circle( 5 )
turtle. color( 160 , 82 , 45 )
turtle. end_fill( )
turtle. pu( )
turtle. seth( 0 )
turtle. fd( 20 )
turtle. pd( )
turtle. pencolor( 255 , 155 , 192 )
turtle. seth( 10 )
turtle. begin_fill( )
turtle. circle( 5 )
turtle. color( 160 , 82 , 45 )
turtle. end_fill( )
def drawHead ( ) :
turtle. color( ( 255 , 155 , 192 ) , "pink" )
turtle. pu( )
turtle. seth( 90 )
turtle. fd( 41 )
turtle. seth( 0 )
turtle. fd( 0 )
turtle. pd( )
turtle. begin_fill( )
turtle. seth( 180 )
turtle. circle( 300 , - 30 )
turtle. circle( 100 , - 60 )
turtle. circle( 80 , - 100 )
turtle. circle( 150 , - 20 )
turtle. circle( 60 , - 95 )
turtle. seth( 161 )
turtle. circle( - 300 , 15 )
turtle. pu( )
turtle. goto( - 100 , 100 )
turtle. pd( )
turtle. seth( - 30 )
a= 0.4
for i in range ( 60 ) :
if 0 <= i< 30 or 60 <= i< 90 :
a= a+ 0.08
turtle. lt( 3 )
turtle. fd( a)
else :
a= a- 0.08
turtle. lt( 3 )
turtle. fd( a)
turtle. end_fill( )
def drawEar ( ) :
turtle. color( ( 255 , 155 , 192 ) , "pink" )
turtle. pu( )
turtle. seth( 90 )
turtle. fd( - 7 )
turtle. seth( 0 )
turtle. fd( 70 )
turtle. pd( )
turtle. begin_fill( )
turtle. seth( 100 )
turtle. circle( - 50 , 50 )
turtle. circle( - 10 , 120 )
turtle. circle( - 50 , 54 )
turtle. end_fill( )
turtle. pu( )
turtle. seth( 90 )
turtle. fd( - 12 )
turtle. seth( 0 )
turtle.