Python turtle 模块,circle() 实例源码

我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用turtle.circle()

项目:miniLogia_Py    作者:ujanlabs    | 项目源码 | 文件源码
def kwiatek(r):
    numPow = 1
    turtle.colormode(255)
    turtle.fillcolor(238, 255, 0)
    ustDoKolka(r)
    turtle.begin_fill()
    turtle.circle(r)
    turtle.end_fill()
    ustDoPlatkow(r)
    while numPow <= 12:
        turtle.pu()
        turtle.fd(r)
        turtle.pd()
        trojkat(r)
        turtle.pu()
        turtle.fd(r)
        turtle.rt(180)
        turtle.rt(360/12)
        numPow = numPow + 1
项目:Scheme    作者:StephenK1998    | 项目源码 | 文件源码
def tscheme_circle(r, extent=None):
    """Draw a circle with center R units to the left of the turtle (i.e.,
    right if N is negative.  If EXTENT is not None, then draw EXTENT degrees
    of the circle only.  Draws in the clockwise direction if R is negative,
    and otherwise counterclockwise, leaving the turtle facing along the
    arc at its end."""
    if extent is None:
        _check_nums(r)
    else:
        _check_nums(r, extent)
    _tscheme_prep()
    turtle.circle(r, extent and extent)
    return okay
项目:Charon    作者:forrestchang    | 项目源码 | 文件源码
def tscheme_circle(r, extent = None):
    """Draw a circle with center R units to the left of the turtle (i.e.,
    right if N is negative.  If EXTENT is not None, then draw EXTENT degrees
    of the circle only.  Draws in the clockwise direction if R is negative,
    and otherwise counterclockwise, leaving the turtle facing along the
    arc at its end."""
    if extent is None:
        _check_nums(r)
    else:
        _check_nums(r, extent)
    _tscheme_prep()
    turtle.circle(r, extent and extent)
    return okay
项目:SchemeInterpreter    作者:GrantHiggins16    | 项目源码 | 文件源码
def tscheme_circle(r, extent = None):
    """Draw a circle with center R units to the left of the turtle (i.e.,
    right if N is negative.  If EXTENT is not None, then draw EXTENT degrees
    of the circle only.  Draws in the clockwise direction if R is negative,
    and otherwise counterclockwise, leaving the turtle facing along the
    arc at its end."""
    if extent is None:
        _check_nums(r)
    else:
        _check_nums(r, extent)
    _tscheme_prep()
    turtle.circle(r, extent and extent)
    return okay
项目:miniLogia_Py    作者:ujanlabs    | 项目源码 | 文件源码
def glowaWonsza(bok, bokPrzekatna, kat):
    turtle.colormode(255)
    szesciokat(bok, bokPrzekatna, kat)
    turtle.pu() ##Start
    turtle.lt(180)
    turtle.pd()
    naGoreWielokata(bok, bokPrzekatna, kat)
    turtle.pu()
    turtle.lt(180)
    turtle.fd(bok)
    turtle.fillcolor(206, 136, 22)
    turtle.begin_fill()
    turtle.rt(90)
    turtle.circle(5)
    turtle.lt(90)
    turtle.end_fill()
    turtle.fillcolor(251, 255, 135)
    turtle.bk(bok)
    turtle.pd()
    naGoreWielokata(bok, bokPrzekatna, kat)
    turtle.pu()
    turtle.lt(90)
    turtle.pd() ##Koniec
    szesciokat(bok, bokPrzekatna, kat)
    turtle.rt(180)
    naGoreWielokata(bok, bokPrzekatna, kat)
    turtle.rt(90)