Ejemplo n.º 1
0
def bump(t, n, height):
    """Makes a bump with radius n at height*n 
    """
    stump(t, n*height)
    arc(t, n/2.0, 180)
    lt(t)
    fdlt(t, n*height+n)
Ejemplo n.º 2
0
def bump(t, n, height):
    """ Para criação do radiano
    """
    stump(t, n * height)
    arc(t, n / 2.0, 180)
    lt(t)
    fdlt(t, n * height + n)
Ejemplo n.º 3
0
def bump(t, n, height):
    """Utworzenie wypukłości o promieniu n dla height*n 
    """
    stump(t, n * height)
    arc(t, n / 2.0, 180)
    lt(t)
    fdlt(t, n * height + n)
Ejemplo n.º 4
0
def draw_j(t, n):
    beam(t, n, 2)
    arc(t, n/2, 90)
    fd(t, 3*n/2)
    skip(t, -2*n)
    rt(t)
    skip(t, n/2)
Ejemplo n.º 5
0
def bump(t, n, height):
    """Makes a bump with radius n at height*n 
    """
    stump(t, n * height)
    arc(t, n / 2.0, 180)
    lt(t)
    fdlt(t, n * height + n)
Ejemplo n.º 6
0
def draw_s(t, n):
    fd(t, n/2)
    arc(t, n/2, 180)
    arc(t, n/2, -180)
    fdlt(t, n/2, -90)
    skip(t, 2*n)
    lt(t)
Ejemplo n.º 7
0
def draw_j(t, n):
    beam(t, n, 2)
    arc(t, n / 2, 90)
    fd(t, 3 * n / 2)
    skip(t, -2 * n)
    rt(t)
    skip(t, n / 2)
Ejemplo n.º 8
0
def draw_j(t, n):
    beam(t, n, 2)
    arc(t, n / 2, 90)
    t.fd(3 * n / 2)
    skip(t, -2 * n)
    t.rt()
    skip(t, n / 2)
Ejemplo n.º 9
0
def petal(t, r, angle):
    """ creates one petal of the bob
    t : turtle, r : size of the petal, angle : angle subtended by the arc
    """
    for i in range(2):
        arc(t, r, angle)
        t.lt(180 - angle)
Ejemplo n.º 10
0
def draw_s(t, n):
    fd(t, n / 2)
    arc(t, n / 2, 180)
    arc(t, n / 2, -180)
    fdlt(t, n / 2, -90)
    skip(t, 2 * n)
    lt(t)
Ejemplo n.º 11
0
def petal(t, r, angle):
    """ Draws a petal.
    t: turtle
    r: radius of the arc
    angle: angle (in degrees) of the/that subtends the arc """
    for i in range(2):
        arc(t, r, angle)
        t.lt(180 - angle)
Ejemplo n.º 12
0
def petal(t, r, angle):
    '''
    Draws a petal shape made out of two arcs with radius r and given angle.
    '''
    for i in range(2):
        arc(t, r, angle)
        # Subtracting 180 from the angle of the arc makes sure we end at start.
        t.lt(180 - angle)
Ejemplo n.º 13
0
def flower(t, n, rf, re):
  angle = asin(0.5 * float(rf) / re) * 180 / pi
  rt(t, angle)

  for _ in range(n):
    arc(t, re, angle * 2)
    lt(t, 180 - angle * 2)
    arc(t, re, angle * 2)
    lt(t, 180 - angle * 2 + 360 / n)
Ejemplo n.º 14
0
def petal(t, r, angle):
    """Draws a petal using two arcs. 
    t: Turtle
    r: radius of the arcs
    angle: angle (degrees) that subtends the arcs
    """
    for i in range(2):
        arc(t, r, angle)
        t.lt(180 - angle)
Ejemplo n.º 15
0
def leave(t, r, degree):
    """ Print a petal

    :param t: Turtle istance
    :param r: radius of petal
    :param degree: of petal
    """
    for i in range(2):
        arc(t, r, degree)
        t.lt(180 - degree)
Ejemplo n.º 16
0
def petal(t, r, angle):
    """Rysuje płatek za pomocą dwóch łuków.

    t: obiekt żółwia
    r: promień łuków
    angle: kąt (w stopniach) odpowiadający łukom
    """
    for i in range(2):
        arc(t, r, angle)
        t.lt(180-angle)
Ejemplo n.º 17
0
def petal(t, r, angle):
    """Draws a petal using two arcs.

    t: Turtle
    r: radius of the arcs
    angle: angle (degrees) that subtends the arcs
    """
    for i in range(2):
        arc(t, r, angle)
        t.lt(180-angle)
Ejemplo n.º 18
0
def petal(t, r, angle):
    for i in range(2):
        arc(t, r, angle)
        lt(t, 180 - angle)
Ejemplo n.º 19
0
def bump(t, n, height):
    stump(t, n * height)
    arc(t, n / 2.0, 180)
    t.lt()
    fdlt(t, n * height + n)
Ejemplo n.º 20
0
def petal(t, r):
  for i in range(2):
    arc(t, r, 60)
    t.lt(180 - 60)
Ejemplo n.º 21
0
def petal(t, r, angle):
    for i in range(2):
        arc(t, r, angle)
        t.lt(180 - angle)
Ejemplo n.º 22
0
def _d(t,length):
    t.rt(90)
    t.fd(length)
    t.lt(90)
    pg.arc(t,length/2,180)
Ejemplo n.º 23
0
def petal(t, r, angle):  #t: turtle r:radius arc

    for i in range(2):
        arc(t, r, angle)
        t.lt(180 - angle)
Ejemplo n.º 24
0
def circle(t, radius):
    arc(t, radius, 360)
Ejemplo n.º 25
0
def petal(t, r, angle):
    for i in range(2):
        arc(t, r, angle)
        lt(t, 180 - angle)
Ejemplo n.º 26
0
def draw_petal(t, r, angle):
    for k in range(2):
        arc(t, r, angle)
        t.lt(180 - angle)
Ejemplo n.º 27
0
def large_curve(t, r, angle, comp):
    arc(t, r, angle)
    t.lt(angle - comp)
Ejemplo n.º 28
0
def small_curve(t, r, angle, comp):
    arc(t, r, angle)
    t.rt(angle - comp)