Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 0 |
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() |
||
|
|||
12 | vertex(40, 40) |
||
13 | vertex(40, 140) |
||
14 | vertex(FRAME, 140) |
||
15 | end_shape("red") |
||
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: |
||
37 | angle += TAU/points |
||
38 | vertex(sin(angle)*radius, cos(angle)*radius) |
||
39 | |||
40 | end_shape("orange") |
||
41 | restore() |
||
42 | reset_style() |
||
43 |