MCPcopy Index your code
hub / github.com/python/cpython / mn_eck

Function mn_eck

Lib/turtledemo/rosette.py:17–32  ·  view source on GitHub ↗
(p, ne,sz)

Source from the content-addressed store, hash-verified

15from time import perf_counter as clock, sleep
16
17def mn_eck(p, ne,sz):
18 turtlelist = [p]
19 #create ne-1 additional turtles
20 for i in range(1,ne):
21 q = p.clone()
22 q.rt(360.0/ne)
23 turtlelist.append(q)
24 p = q
25 for i in range(ne):
26 c = abs(ne/2.0-i)/(ne*.7)
27 # let those ne turtles make a step
28 # in parallel:
29 for t in turtlelist:
30 t.rt(360./ne)
31 t.pencolor(1-c,0,c)
32 t.fd(sz)
33
34def main():
35 s = Screen()

Callers 1

mainFunction · 0.85

Calls 4

absFunction · 0.85
pencolorMethod · 0.80
cloneMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…