Commit 67206d5b authored by Zoheyr Doctor's avatar Zoheyr Doctor 🔭
Browse files

a few more additions

parent b2aa771d
......@@ -28,16 +28,18 @@ for i in range(100):
y2.append(pos2[2])
fig,ax = plt.subplots()
pt1, = ax.plot([],[],color='r',markersize=20)
pt1, = ax.plot([],[],color='r',markersize=20,linestyle='none',marker='o')
def init():
pt1.set_data([],[])
ax.set_xlim([-1,1])
ax.set_ylim([-1,1])
return pt1,
def animate(i):
pt1.set_data([x1[i],x2[i]],[y1[i],y2[i]])
anim = animation.FuncAnimation(fig,animate,init_func=init,frames=100)
anim.save('/home/zoheyr.doctor/public_html/random/orbit.mp4',fps=30,extra_args=['-vcodec', 'libx264'])
anim.save('orbit.mp4',fps=30,extra_args=['-vcodec', 'libx264'])
......@@ -76,7 +76,7 @@ class Binary:
return self.phase1+np.pi
def orbit(self):
self.phase1 = self.phase1 + 2.*np.pi*self.omega/self.frame_rate
self._phase1 = self.phase1 + 2.*np.pi*self.omega/self.frame_rate
@property
def Dmatrix(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment