chap2-anim.py
2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
from t2g import *
#######################
load("chap2-gates.tex")
state = {"low": 0, "high": 1}
active = {"down": "", "up": ""}
frame(.8)
active["down"] = "active"
frame(.8)
active["down"] = ""
state = {"low": 1, "high": 0}
frame(.8)
active["up"] = "active"
frame(.8)
gif("chap2-gates.gif")
#######################
load("chap2-track.tex")
state = {"far": 1, "before": 0, "inside": 0}
active = {"enter": "", "exit": "", "approach": ""}
frame(.8)
active["approach"] = "active"
frame(.8)
active["approach"] = ""
state = {"far": 0, "before": 1, "inside": 0}
frame(.8)
active["enter"] = "active"
frame(.8)
active["enter"] = ""
state = {"far": 0, "before": 0, "inside": 1}
frame(.8)
active["exit"] = "active"
frame(.8)
gif("chap2-track.gif")
#######################
load("chap2-draft.tex")
state = {"far": 1, "before": 0, "inside": 0, "low": 0, "high": 1, "godown": 0, "goup": 0}
active = {"enter": "", "exit": "", "approach": "", "down": "", "up": ""}
frame(.8)
active["approach"] = "active"
frame(.8)
active["approach"] = ""
state = {"far": 0, "before": 1, "inside": 0, "low": 0, "high": 1, "godown": 1, "goup": 0}
frame(.8)
active["down"] = "active"
frame(.8)
active["down"] = ""
state = {"far": 0, "before": 1, "inside": 0, "low": 1, "high": 0, "godown": 0, "goup": 0}
frame(.8)
active["enter"] = "active"
frame(.8)
active["enter"] = ""
state = {"far": 0, "before": 0, "inside": 1, "low": 1, "high": 0, "godown": 0, "goup": 0}
frame(.8)
active["exit"] = "active"
frame(.8)
active["exit"] = ""
state = {"far": 1, "before": 0, "inside": 0, "low": 1, "high": 0, "godown": 0, "goup": 1}
frame(.8)
active["up"] = "active"
frame(.8)
gif("chap2-draft.gif")
#######################
load("chap2-test.tex")
state = {"far": 1, "before": 0, "inside": 0, "low": 0, "high": 1, "godown": 0, "goup": 0}
active = {"enter": "", "exit": "", "approach": "", "down": "", "up": "",
0: "active"}
active.update((s, "") for s in range(1,5))
frame(.8)
active["approach"] = "active"
frame(.8)
active["approach"] = active[0] = ""
active[1] = "active"
state = {"far": 0, "before": 1, "inside": 0, "low": 0, "high": 1, "godown": 1, "goup": 0}
frame(.8)
active["down"] = "active"
frame(.8)
active["down"] = active[1] = ""
active[2] = "active"
state = {"far": 0, "before": 1, "inside": 0, "low": 1, "high": 0, "godown": 0, "goup": 0}
frame(.8)
active["enter"] = "active"
frame(.8)
active["enter"] = active[2] = ""
active[3] = "active"
state = {"far": 0, "before": 0, "inside": 1, "low": 1, "high": 0, "godown": 0, "goup": 0}
frame(.8)
active["exit"] = "active"
frame(.8)
active["exit"] = active[3] = ""
active[4] = "active"
state = {"far": 1, "before": 0, "inside": 0, "low": 1, "high": 0, "godown": 0, "goup": 1}
frame(.8)
active["up"] = "active"
frame(.8)
gif("chap2-test.gif", dpi=450)