Advertisement
furas

Python - Manim - display static image

Mar 28th, 2022 (edited)
871
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # More: https://blog.furas.pl/python-manim-basic-image-animations-in-manim-gb.html
  2.  
  3. # display static image     : https://youtu.be/X6xNsXXIDDM
  4. # display duplicated image : https://youtu.be/LHqwee_ndck
  5. # move without animation   : https://youtu.be/sOR5rTkmWGw
  6. # move with animation      : https://youtu.be/_ho8Grsum_Y
  7. # rotate without animation : https://youtu.be/x4PVJCeESG4
  8. # rotate with animation    : https://youtu.be/TWIeJoTWis4
  9.  
  10. # Image `Lenna` from Wikipedia: https://en.wikipedia.org/wiki/Lenna
  11.  
  12. from manim import *
  13.        
  14. class Example(Scene):
  15.  
  16.     def construct(self):
  17.         self.wait(.1) # to skip animation of first image
  18.        
  19.         image = ImageMobject('lenna.png')
  20.         self.add(image)
  21.  
  22.         self.wait(3)        
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement