Contents - Index

Animating the Diagram and Plot Windows


The Professional license of EES provides powerful capabilities to animate drawing and plots in the Diagram and Plot windows.  Unlike many other animation programs that provide capability to create animated drawings, EES allows the animation to be controlled by calculated values based on the physics of the problem.  The animation in the Diagram window can thus be accurately displayed and directly coupled to information in the plots.  Animations can only be created by the Professional license, but once created, they can be displayed with any EES license, including distributable programs.


Creating an animation with EES is easy.  The first step is to draw the object in a the Diagram (or child diagram Window).  Alternatively, the object can be created in an external program such as Power Point and pasted into the Diagram window.   The object must be given a name in the name field of the object properties dialogThen equations are added into the Equations window to specify the position, size, or color of the object or text.  The position and size are specified in pixels with 0,0 being the upper left corner of the window.  EES provides functions DiagramHeight#, DiagramWidth#, and PixelsperInch# to allow the position and size to be computed in other units and converted to the pixels needed in the Diagram window. 


The final step is to add an Animation control bar to the Diagram window.  This is done by selecting the Add Calculate button in the Diagram Window Toolbar when the Diagram window is in Development modeThe following dialog will appear.   



Click the Animation Control Bar button to place an animation control bar on the Diagram window.



The functions of the controls on the animation bar are indicated above.  Perhaps the only function that needs additional explanation is the save movie button.  The bar can be dragged to a desired location by pressing and holding the mouse button down anywhere on the first four buttons and sliding the mouse to a new location.  


As a simple example, we will animate the position of a ball in the Diagram window.  Bring the Diagram window to the front and set it into Development modeClick the circle tool on the toolbar and create a red ball.  Enter the name of the object to be Ball, as shown.



In the Equations window, enter the following equations.


ball.left=X + 100*sin(X)


Create a Parametric table with columns X, ball.left, and and 360 rows.  Enter values for X between 0 and 360.  


Right-click on the start button in the animation bar to bring up the animation characteristics dialog.   Select the Solve Table button.




Hide the Diagram toolbar so that the Diagram window is now in application mode.  Click the start button and watch the show.  Text and lines can also be animated in this way.


The animation can be coupled to a plot.  Create a new plot with the x-variable set to Ball.left and the y-variable set to Right click on the plot and select the Automatic Update checkbox.  Start the animation and watch the plot.  Its EESy to create animations.


It is possible to create a movie of the animation that can be run without using EES.  To do this, click on the Save Movie button at the right of the animation control bar.