$28 GRAYBYTE WORDPRESS FILE MANAGER $49

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib64/python3.9/turtledemo/

HOME
Current File : /usr/lib64/python3.9/turtledemo//rosette.py
"""      turtle-example-suite:

          tdemo_wikipedia3.py

This example is
inspired by the Wikipedia article on turtle
graphics. (See example wikipedia1 for URLs)

First we create (ne-1) (i.e. 35 in this
example) copies of our first turtle p.
Then we let them perform their steps in
parallel.

Followed by a complete undo().
"""
from turtle import Screen, Turtle, mainloop
from time import perf_counter as clock, sleep

def mn_eck(p, ne,sz):
    turtlelist = [p]
    #create ne-1 additional turtles
    for i in range(1,ne):
        q = p.clone()
        q.rt(360.0/ne)
        turtlelist.append(q)
        p = q
    for i in range(ne):
        c = abs(ne/2.0-i)/(ne*.7)
        # let those ne turtles make a step
        # in parallel:
        for t in turtlelist:
            t.rt(360./ne)
            t.pencolor(1-c,0,c)
            t.fd(sz)

def main():
    s = Screen()
    s.bgcolor("black")
    p=Turtle()
    p.speed(0)
    p.hideturtle()
    p.pencolor("red")
    p.pensize(3)

    s.tracer(36,0)

    at = clock()
    mn_eck(p, 36, 19)
    et = clock()
    z1 = et-at

    sleep(1)

    at = clock()
    while any(t.undobufferentries() for t in s.turtles()):
        for t in s.turtles():
            t.undo()
    et = clock()
    return "runtime: %.3f sec" % (z1+et-at)


if __name__ == '__main__':
    msg = main()
    print(msg)
    mainloop()

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Oct 2025 8.38 AM
root / root
0755
__pycache__
--
31 Oct 2025 8.38 AM
root / root
0755
__init__.py
0.307 KB
7 Sep 2024 2.03 AM
root / root
0644
__main__.py
14.696 KB
7 Sep 2024 2.03 AM
root / root
0755
bytedesign.py
4.147 KB
7 Sep 2024 2.03 AM
root / root
0755
chaos.py
0.929 KB
7 Sep 2024 2.03 AM
root / root
0644
clock.py
3.125 KB
7 Sep 2024 2.03 AM
root / root
0755
colormixer.py
1.308 KB
7 Sep 2024 2.03 AM
root / root
0644
forest.py
2.896 KB
7 Sep 2024 2.03 AM
root / root
0755
fractalcurves.py
3.391 KB
7 Sep 2024 2.03 AM
root / root
0755
lindenmayer.py
2.376 KB
7 Sep 2024 2.03 AM
root / root
0755
minimal_hanoi.py
2.002 KB
7 Sep 2024 2.03 AM
root / root
0755
nim.py
6.36 KB
7 Sep 2024 2.03 AM
root / root
0644
paint.py
1.26 KB
7 Sep 2024 2.03 AM
root / root
0755
peace.py
1.04 KB
7 Sep 2024 2.03 AM
root / root
0755
penrose.py
3.3 KB
7 Sep 2024 2.03 AM
root / root
0755
planet_and_moon.py
2.758 KB
7 Sep 2024 2.03 AM
root / root
0755
rosette.py
1.329 KB
7 Sep 2024 2.03 AM
root / root
0644
round_dance.py
1.762 KB
7 Sep 2024 2.03 AM
root / root
0644
sorting_animate.py
4.933 KB
7 Sep 2024 2.03 AM
root / root
0755
tree.py
1.367 KB
7 Sep 2024 2.03 AM
root / root
0755
turtle.cfg
0.156 KB
7 Sep 2024 2.03 AM
root / root
0644
two_canvases.py
1.093 KB
7 Sep 2024 2.03 AM
root / root
0644
yinyang.py
0.801 KB
7 Sep 2024 2.03 AM
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF