![]() ![]() write_gif ( "wireframe.gif", fps = 20 )Īs Mayavi relies on the powerful ITK visualization engine it can also process complex datasets. write_videofile ( "wireframe.mp4", fps = 20 ) animation. resize ( 0.5 ) # Video generation takes 10 seconds, GIF generation takes 25s animation. ![]() VideoClip ( make_frame, duration = duration ). screenshot ( antialiased = True ) # return a RGB image animation = mpy. view ( azimuth = 360 * t / duration, distance = 9 ) # camera angle return mlab. set ( y = y ) # change y-coordinates of the mesh mlab. 5, tube_radius = 0.2, figure = fig ) # ANIMATE THE FIGURE WITH MOVIEPY, WRITE AN ANIMATED GIF def make_frame ( t ): """ Generates and returns the frame for time t. plot3d ( xx, yy, zz, representation = "wireframe", tube_sides = 5, line_width =. ![]() Import numpy as np import mayavi.mlab as mlab import moviepy.editor as mpy duration = 2 # duration of the animation in seconds (it will loop) # MAKE A FIGURE WITH MAYAVI fig = mlab. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |