本文整理汇总了Python中turtle.lt函数的典型用法代码示例。如果您正苦于以下问题:Python lt函数的具体用法?Python lt怎么用?Python lt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ustDoNastKraw
def ustDoNastKraw(ile, bokKw=10):
turtle.pu()
turtle.lt(90)
turtle.fd(bokKw)
turtle.rt(90)
turtle.rt(180)
turtle.pd()
示例2: 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()
示例3: kwiatek
def kwiatek():
p = 0
while (p <= 7):
platek()
turtle.bk(50)
turtle.lt(360/8)
p = p + 1
示例4: szach
def szach(n):
ustNaStart()
numPowX = 1
numPowY = 1
bok = floor(450 / n)
while(numPowY <= n / 2):
while(numPowX <= n / 2):
parzDwaKwadraty(bok)
numPowX = numPowX + 1
korDuza(n)
turtle.pu()
turtle.lt(90)
turtle.fd(bok)
turtle.rt(90)
turtle.pd()
numPowX = 1
while(numPowX <= n / 2):
nieParzDwaKwadraty(bok)
numPowX = numPowX + 1
korDuza(n)
turtle.pu()
turtle.lt(90)
turtle.fd(bok)
turtle.rt(90)
turtle.pd()
numPowX = 1
numPowY = numPowY + 1
示例5: circle
def circle (r, cl, lt, p, t):
t.goto(0, 0)
t.color(cl)
t.pensize(1)
for i in range (0, 360):
t.fd(2.0*math.sin(math.pi/360)*r)
turtle.lt(1)
示例6: makeshape
def makeshape():
B = 25 # base unit size
turtle.begin_poly()
turtle.fd(B) # roof
turtle.rt(45)
turtle.fd(B * 3/4) # windshield
turtle.lt(45)
turtle.fd(B) # hood
turtle.rt(90)
turtle.fd(B * 3/4) # front
turtle.rt(90)
turtle.fd(B * 1/7)
turtle.lt(90)
turtle.circle(-B/2, 180) # front tire
turtle.lt(90)
turtle.fd(B)
turtle.lt(90)
turtle.circle(-B/2, 180) # back tire
turtle.lt(90)
turtle.fd(B * 1/7)
turtle.rt(90)
turtle.fd(B * 5/6) # back
turtle.end_poly()
poly = turtle.get_poly()
turtle.register_shape('car', poly)
示例7: kwadrat
def kwadrat(bok):
numPow = 1
while(numPow <= 4):
turtle.fd(bok)
turtle.lt(90)
numPow = numPow + 1
korMala(bok)
示例8: ustDoElki
def ustDoElki(dlBokKw, bokKr):
turtle.pu()
turtle.fd(bokKr - dlBokKw)
turtle.lt(90)
turtle.fd(dlBokKw)
turtle.lt(90)
turtle.pd()
示例9: wiatrak
def wiatrak(wysokosc):
turtle.lt(90)
turtle.fd(wysokosc*26)
trapez(pomaranczowy)
turtle.pu()
turtle.fd(26)
turtle.rt(90)
turtle.fd(26)
turtle.rt(180)
turtle.pd()
trapez(zielony)
turtle.pu()
turtle.fd(26)
turtle.rt(90)
turtle.fd(26)
turtle.rt(180)
turtle.pd()
trapez(pomaranczowy)
turtle.pu()
turtle.fd(26)
turtle.rt(90)
turtle.fd(26)
turtle.lt(180)
turtle.pd()
trapez(zielony)
turtle.pu()
turtle.fd(26)
turtle.rt(90)
turtle.fd(26*(wysokosc+1))
turtle.pd()
示例10: ustDoKwadratu
def ustDoKwadratu(dlBokKw):
turtle.pu()
turtle.fd(dlBokKw * 2)
turtle.lt(90)
turtle.fd(dlBokKw * 2)
turtle.lt(90)
turtle.pd()
示例11: ustNaStartKwiatki
def ustNaStartKwiatki(rozmKanwy, segment):
turtle.pu()
turtle.bk(225)
turtle.lt(90)
turtle.bk(225)
turtle.rt(90)
turtle.pd()
示例12: plansza
def plansza(bok):
bokMalKw = bok/7
rDuzKol = bokMalKw
rMalKol = bokMalKw/2
numPowPlus = 1
numPowKola = 1
ustNaStart(bok)
turtle.pu() ##W figurach nie ma krawędzi
duzyKwadrat(bok)
ustDoPlusa(bokMalKw)
while numPowPlus <= 4:
plus(bokMalKw, rMalKol)
turtle.rt(90)
turtle.fd(bokMalKw)
numPowPlus = numPowPlus + 1
ustDoKol(bokMalKw)
turtle.fillcolor(250, 250, 0)
while numPowKola <= 4:
turtle.rt(90)
turtle.fd(bokMalKw)
turtle.lt(180)
turtle.begin_fill()
turtle.circle(rDuzKol)
turtle.end_fill()
turtle.lt(180)
turtle.fd(bokMalKw * 6)
numPowKola = numPowKola + 1
turtle.pd()
示例13: rogi
def rogi(bok):
gamma = 90 + 18
beta = 360 / 5
alpha = 180 - beta
romb(bok)
naGoreRombu(bok)
turtle.lt(gamma)
romb(bok)
naGoreRombu(bok)
turtle.rt(gamma)
romb(bok)
turtle.pu()
turtle.rt(gamma)
turtle.fd(bok)
turtle.lt(beta)
turtle.fd(60)
turtle.rt(beta)
turtle.pd()
romb(bok)
naGoreRombu(bok)
turtle.lt(alpha)
romb(bok)
turtle.lt(beta)
naGoreRombu(bok)
turtle.lt(beta*1.5)
naGoreRombu(bok)
turtle.rt(180)
示例14: 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()
示例15: okoP
def okoP(a):
turtle.begin_fill()
wielokat(6, a *4, 4)
turtle.end_fill()
turtle.rt(180)
turtle.fd(a * 4)
turtle.lt(360 / 6)
turtle.fd(a * 4)
turtle.lt(360 / 6)
turtle.fd(a * 4)
turtle.colormode(255)
turtle.fillcolor(255, 255, 255)
turtle.rt(180)
turtle.fd(a)
turtle.rt(120)
turtle.begin_fill()
wielokat(6, 2 * a, 4)
turtle.end_fill()
turtle.rt(60)
turtle.fd(a / 2)
turtle.rt(120)
turtle.fillcolor(0, 0, 0)
turtle.begin_fill()
wielokat(6, a, 4)
turtle.end_fill()