python画花朵代码_用Python绘制玫瑰花的源代码

import turtle

turtle.setup(1100,1000)

turtle.hideturtle()

turtle.speed(10)

turtle.penup()

turtle.goto(50,-550)

turtle.pensize(5)

turtle.pencolor("black")

turtle.seth(140)

turtle.pendown()

turtle.speed(10)

turtle.circle(-400,60)

turtle.fd(100)

turtle.seth(10)

turtle.fd(50)

turtle.fillcolor("green")

turtle.begin_fill()

turtle.right(40)

turtle.circle(120,80)

turtle.left(100)

turtle.circle(120,80)

turtle.end_fill()

turtle.seth(10)

turtle.fd(90)

turtle.speed(11)

turtle.penup()

turtle.fd(-140)

turtle.seth(80)

turtle.pendown()

turtle.speed(10)

turtle.fd(70)

turtle.seth(160)

turtle.fd(50)

turtle.fillcolor("green")

turtle.begin_fill()

turtle.right(40)

turtle.circle(120,80)

turtle.left(100)

turtle.circle(120,80)

turtle.end_fill()

turtle.seth(160)

turtle.fd(90)

turtle.speed(11)

turtle.penup()

turtle.fd(-140)

turtle.seth(80)

turtle.pendown()

turtle.speed(10)

turtle.fd(100)

turtle.seth(-20)

turtle.fillcolor("crimson")

turtle.begin_fill()

turtle.circle(100,100)

turtle.circle(-110,70)

turtle.seth(179)

turtle.circle(223,76)

turtle.end_fill()

turtle.speed(11)

turtle.fillcolor("red")

turtle.begin_fill()

turtle.left(180)

turtle.circle(-223,60)

turtle.seth(70)

turtle.speed(10)

turtle.circle(-213,15)#55

turtle.left(70)#125

turtle.circle(200,70)

turtle.seth(-80)

turtle.circle(-170,40)

turtle.circle(124,94)

turtle.end_fill()

turtle.speed(11)

turtle.penup()

turtle.right(180)

turtle.circle(-124,94)

turtle.circle(170,40)

turtle.pendown()

turtle.speed(10)

turtle.seth(-60)

turtle.circle(175,70)

turtle.seth(235)

turtle.circle(300,12)

turtle.right(180)

turtle.circle(-300,12)

turtle.seth(125)

turtle.circle(150,60)

turtle.seth(70)

turtle.fd(-20)

turtle.fd(20)

turtle.seth(-45)

turtle.circle(150,40)

turtle.seth(66)

turtle.fd(-18.5)

turtle.fd(18.5)

turtle.seth(140)

turtle.circle(150,27)

turtle.seth(60)

turtle.fd(-8)

turtle.speed(11)

turtle.penup()

turtle.left(20.8)

turtle.fd(-250.5)

turtle.pendown()

turtle.speed(10)

turtle.fillcolor("crimson")

turtle.begin_fill()

turtle.seth(160)

turtle.circle(-140,85)

turtle.circle(100,70)

turtle.right(165)

turtle.circle(-200,32)

turtle.speed(11)

turtle.seth(-105)

turtle.circle(-170,14.5)

turtle.circle(123,94)

turtle.end_fill()

dcbf4232935c007f1be2b36754863d48.png

代码来源于网络,因学习需要做了一些改动,侵权删除

你可能感兴趣的:(python画花朵代码)