本文整理汇总了Python中turtle.pd函数的典型用法代码示例。如果您正苦于以下问题:Python pd函数的具体用法?Python pd怎么用?Python pd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pd函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ustDoNastTetki
def ustDoNastTetki(orient=1, bokKw=10):
turtle.pu()
turtle.rt(90*orient)
turtle.fd(bokKw*2)
turtle.lt(90*orient)
turtle.fd(bokKw*3)
turtle.pd()
示例2: ustNaStart
def ustNaStart(r):
turtle.lt(90)
turtle.pu()
turtle.rt(90)
turtle.fd(r)
turtle.lt(90)
turtle.pd()
示例3: circle
def circle(x,y,size):
turtle.pu()
turtle.goto(x,y)
turtle.pd()
turtle.begin_fill()
turtle.circle(size)
turtle.end_fill()
示例4: line
def line(a1,b1,a2,b2,c):
turtle.pu()
turtle.goto(a1,b1)
turtle.color(c)
turtle.pd()
turtle.pensize(10)
turtle.goto(a2,b2)
示例5: ustNaStart
def ustNaStart(dlBokKw, ile):
turtle.pu()
turtle.bk(dlBokKw * ile / 2 +5)
turtle.lt(90)
turtle.fd(dlBokKw * (ile - 2) / 2 - 5)
turtle.rt(90)
turtle.pd()
示例6: ustDoPOka
def ustDoPOka(a):
turtle.rt(60)
turtle.bk(a * 1.5)
turtle.lt(60)
turtle.pu()
turtle.rt(180)
turtle.fd(4 * a)
turtle.lt(60)
turtle.fd(4 * a)
turtle.lt(60)
turtle.fd(4 * a)
turtle.rt(60)
turtle.fd(4 * a)
turtle.lt(60)
turtle.lt(360 / 12)
turtle.fd(a * 8)
turtle.lt(360 / 12)
turtle.fd(a * 8)
turtle.lt(360 / 12)
turtle.fd(a * 8)
turtle.lt(360 / 12)
turtle.lt(60)
turtle.fd(4 * a)
turtle.lt(60)
turtle.fd(a * 4)
turtle.pd()
示例7: turmandel
def turmandel(step, zoom, xres, yres, xthresh, ythresh):
turtle.setheading(0)
for y in range(yres):
turtle.pu()
turtle.setpos(0, y)
turtle.pd()
for x in range(xres):
x = float(x)
y = float(y)
u = float(x)/float((xres/zoom))-xthresh
v = float(y)/float((yres/zoom))-ythresh
x0 = float(u)
y0 = float(v)
a = 0.0
b = 0.0
i = step
while ((i>0) and (a+b<=4.0)):
a = float(x0*x0)
b = float(y0*y0)
y0 = float(2.0*x0*y0+v)
x0 = float(a-b+u)
i = i - 1
color = i % 255
turtle.pencolor((color, color, color))
if i < 1:
turtle.pencolor((0,0,0))
turtle.fd(1)
示例8: ustDoElki
def ustDoElki(dlBokKw, bokKr):
turtle.pu()
turtle.fd(bokKr - dlBokKw)
turtle.lt(90)
turtle.fd(dlBokKw)
turtle.lt(90)
turtle.pd()
示例9: ustDo2Elki
def ustDo2Elki(dlBokKw, bokKr, bokDl):
turtle.pu()
turtle.fd(bokKr - dlBokKw *2)
turtle.rt(90)
turtle.fd(bokDl - dlBokKw*2)
turtle.rt(90)
turtle.pd()
示例10: ustNaStartKwiatki
def ustNaStartKwiatki(rozmKanwy, segment):
turtle.pu()
turtle.bk(225)
turtle.lt(90)
turtle.bk(225)
turtle.rt(90)
turtle.pd()
示例11: draw_triangle
def draw_triangle(x,y):
turtle.penup()
turtle.goto(x,y)
turtle.pd()
turtle.goto(x+25,y+50)
turtle.goto(x+50,y)
turtle.goto(x,y)
示例12: ustNaStart
def ustNaStart(a):
turtle.pu()
turtle.bk(a)
turtle.lt(90)
turtle.fd(a / 2)
turtle.rt(90)
turtle.pd()
示例13: draw_triangle
def draw_triangle(x,y):
turtle.pu()
turtle.goto(x,y)
turtle.pd()
turtle.goto(x+60,y+85)
turtle.goto(x+85,y)
turtle.goto(x,y)
示例14: ustDoNastKraw
def ustDoNastKraw(ile, bokKw=10):
turtle.pu()
turtle.lt(90)
turtle.fd(bokKw)
turtle.rt(90)
turtle.rt(180)
turtle.pd()
示例15: rowOfShapes
def rowOfShapes(number):
for x in xrange(number):
hexaTrangle(25,90,randomColor(),randomColor())
turtle.left(90)
turtle.pu()
turtle.fd(15)
turtle.pd()