File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
@author: Jonathan Peltier
6
6
7
- GitHub deposit :
7
+ GitHub repository :
8
8
https://github.com/Python-simulation/Black-hole-simulation-using-python/
9
9
10
10
BlackHole class solving photons trajectories closed to a static black hole.
@@ -41,6 +41,7 @@ class BlackHole:
41
41
def __init__ (self ):
42
42
"""Main class"""
43
43
self .init_var ()
44
+ plt .ion ()
44
45
45
46
try :
46
47
abs_path = os .path .abspath (os .path .dirname (sys .argv [0 ]))
@@ -164,7 +165,7 @@ def img_resize(self, axe_X):
164
165
if axe_Y % 2 != 0 :
165
166
axe_Y -= 1
166
167
167
- self .img_debut = self .img_debut .resize ((axe_X , axe_Y ), Image .ANTIALIAS )
168
+ self .img_debut = self .img_debut .resize ((axe_X , axe_Y ), Image .Resampling . LANCZOS )
168
169
self .FOV_img_Y = self .FOV_img * axe_Y / axe_X
169
170
170
171
if self .FOV_img_Y > 180 :
@@ -631,6 +632,8 @@ def draw(self):
631
632
self .ax .set_ylim ((down_side , up_side ))
632
633
# print((self.left_side, self.right_side), (self.down_side, self.up_side))
633
634
self .fig .canvas .draw ()
635
+ plt .draw ()
636
+ plt .pause (0.001 )
634
637
635
638
def onclick (self , event ):
636
639
"""Use to apply an offset when right clicking. Will be replace by a
You can’t perform that action at this time.
0 commit comments