@@ -14,25 +14,56 @@ begin
14
14
end
15
15
16
16
# ╔═╡ 5268feee-bda2-4612-9d4c-a1db424a11c7
17
- data = get_data (i= 0 , n= - 1 )
17
+ data = DoublePendulum . get_data (i= 0 , n= - 1 )[:, end - 2048 + 1 : end ]
18
18
19
- # ╔═╡ 9c8b3f8a-1b85-4c32-a416-ead51b244b94
19
+ # ╔═╡ 4d0b08a4-8a54-41fd-997f-ad54d4c984cd
20
+ m = DoublePendulum. get_model ()
21
+
22
+ # ╔═╡ 794374ce-6674-481d-8a3b-04db0f32d233
20
23
begin
21
- anim = @animate for i in 1 : 1000
22
- scatter (legend= false , xlim= (0 , 1 ), ylim= (0 , 1 ))
23
- scatter! (data[[1 , 3 , 5 ], i], data[[2 , 4 , 6 ], i], color= [:red , :green , :blue ])
24
- annotate! (0.1 , 0.1 , text (" i=$i " , :left ))
24
+ n = 10
25
+
26
+ ground_truth_data = 1 .- data[:, 1 + n: 1024 + n]
27
+
28
+ inferenced_data = m (reshape (data[:, 1 : 1024 ], 1 , 6 , :, 1 ))
29
+ for i in 1 : n
30
+ inferenced_data = m (inferenced_data)
25
31
end
26
-
27
- gif (anim, fps= 10 )
32
+ inferenced_data = 1 .- reshape (inferenced_data, 6 , :)
28
33
end
29
34
30
- # ╔═╡ 4a1ebdfe-2524-4d3e-b4ab-520af315063f
35
+ # ╔═╡ 9c8b3f8a-1b85-4c32-a416-ead51b244b94
36
+ begin
37
+ anim = @animate for i in 1 : 4 : 1024
38
+ scatter (legend= false , xlim= (0 , 1 ), ylim= (- 0.5 , 1 ), size= (600 , 500 ))
39
+ scatter! (
40
+ inferenced_data[[2 , 4 , 6 ], i], inferenced_data[[1 , 3 , 5 ], i],
41
+ color= [
42
+ RGB ([239 , 71 , 111 ]/ 255 ... ),
43
+ RGB ([6 , 214 , 160 ]/ 255 ... ),
44
+ RGB ([17 , 138 , 178 ]/ 255 ... )
45
+ ],
46
+ markersize= 8
47
+ )
48
+ scatter! (
49
+ ground_truth_data[[2 , 4 , 6 ], i], ground_truth_data[[1 , 3 , 5 ], i],
50
+ color= [
51
+ RGB ([255 , 166 , 158 ]/ 255 ... ),
52
+ RGB ([184 , 242 , 230 ]/ 255 ... ),
53
+ RGB ([174 , 217 , 224 ]/ 255 ... )
54
+ ],
55
+ markersize= 4
56
+ )
57
+ annotate! (0.1 , - 0.4 , text (" i=$i " , :left ))
58
+ end
31
59
60
+ gif (anim)
61
+ end
32
62
33
63
# ╔═╡ Cell order:
34
64
# ╟─194baef2-0417-11ec-05ab-4527ef614024
35
65
# ╠═38c9ced5-dcf8-4e03-ac07-7c435687861b
36
66
# ╠═5268feee-bda2-4612-9d4c-a1db424a11c7
37
- # ╠═9c8b3f8a-1b85-4c32-a416-ead51b244b94
38
- # ╠═4a1ebdfe-2524-4d3e-b4ab-520af315063f
67
+ # ╠═4d0b08a4-8a54-41fd-997f-ad54d4c984cd
68
+ # ╠═794374ce-6674-481d-8a3b-04db0f32d233
69
+ # ╟─9c8b3f8a-1b85-4c32-a416-ead51b244b94
0 commit comments