PlotAnime Command (Plot Animation)#
PlotAnime is the command that should be used to show an animation of recorded steps. Users initially should record the desired steps using Record() command. The Record() command records the required data for creating animation and in each desired step user should call the Record() command. Finally, when all desired steps recording finished, by calling PlotAnime command, the animation of the plot will be shown. Using RecordReset() command the recorded steps will be reset.
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.PlotAnime (plotmode=1, dt=0.01, **kwargs) #Show animation of the recorded steps
Click on Pause botton and then click on Play button on the below animation to watch the created animation as a sample.