@@ -26,8 +26,9 @@ def calculate_pendulum():
2626 theta_velocity = 0
2727
2828 for _ in time_stap :
29- theta_new , theta_velocity = full_pendulum (g , L , theta [- 1 ],
30- theta_velocity , time_step )
29+ theta_new , theta_velocity = full_pendulum (
30+ g , L , theta [- 1 ], theta_velocity , time_step
31+ )
3132 theta .append (theta_new )
3233
3334 # persamaan proyeksi panjang tali
@@ -40,8 +41,8 @@ def setup_axis(axis) -> None:
4041 """
4142 Setup sumbu x dan y.
4243 """
43- axis .set_xlim (- L - 0.2 , L + 0.2 )
44- axis .set_ylim (- L - 0.2 , L )
44+ axis .set_xlim (- L - 0.2 , L + 0.2 )
45+ axis .set_ylim (- L - 0.2 , L )
4546 axis .grid ()
4647 return axis
4748
@@ -50,9 +51,9 @@ def create_plot_elements(axis) -> None:
5051 """
5152 Membuat elemen plot yang akan dianimasu.
5253 """
53- rod_line , = axis .plot ([], [], lw = 2 )
54- mass_point , = axis .plot ([], [], marker = 'o' , markersize = 10 )
55- trace , = axis .plot ([], [], '-' , lw = 1 , alpha = 0.6 )
54+ ( rod_line ,) = axis .plot ([], [], lw = 2 )
55+ ( mass_point ,) = axis .plot ([], [], marker = "o" , markersize = 10 )
56+ ( trace ,) = axis .plot ([], [], "-" , lw = 1 , alpha = 0.6 )
5657 return rod_line , mass_point , trace
5758
5859
@@ -89,7 +90,7 @@ def init():
8990 init_func = init ,
9091 frames = len (time_stap ),
9192 interval = 25 ,
92- blit = True
93+ blit = True ,
9394 )
9495
9596 print (animation )
0 commit comments