Completed
Push — master ( c37b8d...0e5d6a )
by
unknown
30s queued 12s
created

example_009   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 30
dl 0
loc 43
rs 10
c 0
b 0
f 0
wmc 3

2 Functions

Rating   Name   Duplication   Size   Complexity  
A start() 0 2 1
A update() 0 35 2
1
from pypen import *
2
3
4
def start():
5
    settings.fps = 60
6
7
8
def update():
9
    fill_screen("#343434")
10
11
    begin_shape()
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable begin_shape does not seem to be defined.
Loading history...
12
    vertex(40, 40)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable vertex does not seem to be defined.
Loading history...
13
    vertex(40, 140)
14
    vertex(FRAME, 140)
15
    end_shape("red")
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable end_shape does not seem to be defined.
Loading history...
16
17
    begin_shape()
18
    vertex(40+FRAME, 240+FRAME)
19
    vertex(40, 340)
20
    vertex(FRAME, 340)
21
    vertex(340, 280)
22
23
    end_shape("yellow", "blue", 5)
24
25
    reset_style()
26
27
    angle = 0
28
    points = 10 + sin(TIME*2)*5
29
    radius = 100
30
31
    save()
32
    translate(WIDTH/2, HEIGHT/2)
33
34
    begin_shape()
35
36
    while angle <= TAU:
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable TAU does not seem to be defined.
Loading history...
37
        angle += TAU/points
38
        vertex(sin(angle)*radius, cos(angle)*radius)
39
40
    end_shape("orange")
41
    restore()
42
    reset_style()
43