当前位置: 首页>>代码示例>>Python>>正文


Python logo.turn函数代码示例

本文整理汇总了Python中tealight.logo.turn函数的典型用法代码示例。如果您正苦于以下问题:Python turn函数的具体用法?Python turn怎么用?Python turn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了turn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: waterwheel

def waterwheel(edges, size):
  angle = 210.0
  decoration = size / 2
  for i in range(0, edges):
    move(size)
    square(decoration)
    turn(angle)
开发者ID:arty001,项目名称:tealight-files,代码行数:7,代码来源:waterwheel.py

示例2: waterwheel

def waterwheel(edges, size):
  angle = 360 / edges
  decoration = size /3
  for i in range(0, edges):
    move(size)
    triangle(decoration)
    turn(angle)
开发者ID:chloea,项目名称:tealight-files,代码行数:7,代码来源:waterwheel.py

示例3: waterwheel

def waterwheel(edges, size):
  angle = 360 / edges
  decoration = size / 2
  for i in range(0, edges):
    move(size)
    shape(decoration, 3)
    turn(angle)
开发者ID:c-ryan747,项目名称:tealight-files,代码行数:7,代码来源:waterwheel.py

示例4: waterwheel

def waterwheel(edges, size):
  angle = 400 / edges
  decoration = size / 6
  for i in range(0, edges):
    move(size)
    square(decoration)
    turn(angle)
开发者ID:LizzTebbutt,项目名称:tealight-files,代码行数:7,代码来源:waterwheel.py

示例5: waterwheel

def waterwheel(edges, size): #Drawing waterwheel
  angle = 360 / edges
  decoration = size / 2
  for i in range(0, edges):
    move(size)
    square(decoration)
    turn(angle)
开发者ID:Krimzar,项目名称:tealight-files,代码行数:7,代码来源:waterwheel.py

示例6: board

def board(side):
  for i in range(0,8):
    row(side)
    move(side)
    turn(-90)
    move(side*8)
    turn(90)
开发者ID:TheAIAJ,项目名称:tealight-files,代码行数:7,代码来源:chessboard2.py

示例7: spiral

def spiral(size):
  
  if size > 300:
    return
  
  move(size)
  turn(60)
  spiral(size + 5)
开发者ID:chloea,项目名称:tealight-files,代码行数:8,代码来源:spiral.py

示例8: spiral

def spiral(size):
  
  if size > 300: #terminate after 300 rounds
    return
  
  move(size)
  turn(60) #interior angle
  spiral(size + 5) #make new side slightly bigger
开发者ID:c-ryan747,项目名称:tealight-files,代码行数:8,代码来源:spiral.py

示例9: spiral

def spiral(size):
  
  if size > 300:
    return
  
  move(size)
  turn(90)
  spiral(size + 10)
开发者ID:Orthoc,项目名称:tealight-files,代码行数:8,代码来源:spiral.py

示例10: spiral

def spiral(size):
  
  if size > 500:
    return
  
  move(size)
  turn(91)
  spiral(size + 5)
开发者ID:adam1984,项目名称:tealight-files,代码行数:8,代码来源:spiral.py

示例11: waterwheel

def waterwheel(edges, size):
  angle = 360 / edges
  decoration = size / 4
  for i in range(0, edges):
    move(size)
    #square(decoration)
    circle(500)
    turn(angle)
开发者ID:pb471,项目名称:tealight-files,代码行数:8,代码来源:waterwheel.py

示例12: blacksquare

def blacksquare(size):
  
  if size > 300:
    return
  
  move(size)
  turn(90)
  blacksquare(size + 0.5)
开发者ID:arty001,项目名称:tealight-files,代码行数:8,代码来源:Chessboard.py

示例13: spiral

def spiral(size):
  
  if size > 300:
    return
  
  color("RGB(255,10,0)")
  move(size)
  turn(120)
  spiral(size + 8)
开发者ID:alejarcialopez,项目名称:tealight-files,代码行数:9,代码来源:spiral.py

示例14: segment

def segment(scale, detail):
  
  if detail == 0:
    None
  else:
    for i in range(0, 3):
      move(scale)
      turn(120)
      segment(scale / 2, detail - 1)
开发者ID:TheAIAJ,项目名称:tealight-files,代码行数:9,代码来源:fractalTriangle.py

示例15: handle_frame

def handle_frame():
    global d

    for x in range(10):
        d += 1

        color("hsl(%d,100%%,50%%)" % d)
        move(random() * 5)
        turn(random() * 90 - 45)
开发者ID:GriffithsBen,项目名称:tealight-files,代码行数:9,代码来源:smooth_walk.py


注:本文中的tealight.logo.turn函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。