PlotAnimeGif command (Create Animation in gif format)#

The structure of this command is completely compatible with PlotAnime command but this command creates a gif file from the recorded steps. Just use PlotAnimeGif instead of PlotAnime. To create an animation or gif of animation:

  • Using Record() command record each step that are desired to animate.

  • Using PlotAnime or PlotAnimeGif create the animation.

Attention: The Record() command add the current analyzed step to all previously recorded steps. It is important to remember to use RecordReset() command to reset the recorder and delete the recorded steps for a new animation. Also remeber that generating gif file usually takes long time!

The structure of the command#
import openseespy.opensees as ops
import BraineryWiz as bz

#codes of creating OpenSees model

numberOfSteps=100    #Imagine the number of steps that want to be recorded are 100 steps

bz.RecorderReset()   #Reset the recorder to prevent adding new steps (slides) to previous recorded slides

for i in range(numberOfSteps):

     ops.analyze(1,0.01) #One step analysis
     bz.Record()         #Record the analyzed step

bz.PlotAnimeGif (**kwargs) #Show animation of the recorded steps

Click here to downlad the created gif file as a sample.

PlotAnimeGif command options#

  • **kwargs

    Stands for other options that user can use to provide desired changes in the plot. In the following the existing options are described.

PlotAnimeGif Related Commands