Peter Lorenz | Simulation und Animation |
---|
In the Run-Mode an Animation Time or Animation Clock starts running.
It runs at a constant but adjustable Speed.
The Animation Trace file (ATF) contains Animation Commands, that are being processed in Run Mode.
They relate to animation time, objects, positioning of objects, changing the state of objects and motion.
Apart from that they relate to Messages, Bars and Plots, that change during the runtime of the animation.
This Chapter deals with animation commands for generating, placing,moving, rotating and terminating objects
The Run Mode is for starting and controling an animation run. The run of a animation can be understood as a sequential processing of an ATF. The run ends, when the final End command has been processed. The following figure shows how a running animation can be controlled.
Menu and Tool Bar in the Run Mode
ge("Im Run-Mode bietet die Werkzeugleiste folgende Funktionen an", "The tool bar of the run mode offers the following functions") ?>:
ge("Für die Realitätstreue von Modellen spielt die Genauigkeit der Nachbildung der Zeit eine wichtige Rolle", "For the realism of models the exactness of the imitation of time is very important") ?>.
ge("Die Animationszeit in Proof Animation beginnt bei Null und hat wachsende, reelle Werte. Im Unterschied zur Simulationszeit verändert sie sich während eines Animationslaufes, also im Run-Modus, in kleinen äquidistanten Schritten. Für jeden Schritt wird ein neues Bild errechnet und gezeigt. Dabei ist das Animationssystem darum bemüht, eine möglichst strenge Proportionalität zwischen Realzeit und Animationszeit einzuhalten und muss dazu bei Bildern mit sehr vielen bewegten Objekten die Bildwiederholfrequenz der Rechenleistung anpassen.", "The animation time in Proof Animation starts at zero. Other than the simulated time, the animation time changes during the animation runtime, that is in the run mode, in small steps. For each step a new picture is calculated and displayed. The animation system tries to keep a realistic proportion between realtime and animation time. In the case of very many moving objects the refresh rate has to be adapted to the computing performance.") ?>
ge("Die Einheit der Animationszeit kann frei interpretiert werden. Es ist dem Nutzer überlassen, ob er eine Sekunde, eine Minute, eine Stunde oder einen Monat als Zeiteinheit benutzt und die Animationszeit entsprechend interpretiert. Generell ist davor zu warnen, für die Simulation eine andere Interpretation der Zeiteinheit zu wählen, als für die Animation. Wenn die Zeiteinheit des Simulationsmodells als Minute interpretiert wird, sollte dieselbe Interpretation auch für die Zeiteinheit der Animation gelten.", "The unit of the animation time is left to individual interpretation. It is for the user to decide whether to interpret a unit of the animation time as a second, a minute, an hour or a whole month. Generally it is to be avoided to use different interpretations for simulation and animation. If one step of time in the simulation model is interpreted as a minute, the same interpretation should be used for the animation.") ?>
ge("Nachdem man sich für eine bestimmte Interpretation für die Einheit der Animationszeit entschieden hat, kann man nun das Darstellungsformat dieser Zeit festlegen. Die aktuelle Animationszeit wird im Run-Modus auf der rechten Seite der der Werkzeugleiste (Toolbar) angezeigt. Das Darstellungsformat kann man im Draw-Modus wählen. Wenn man View selektiert und Toolbar Date/Time Format wählt, erhält man das nebenstehende Bild. Hier kann man nun die gewählte Zeiteinheit eintragen und eine Startzeit spezifizieren.", "After the decision about the animation time unit the format of the display of thisw time can be specified. The current animation time is displayed on the right of the toolbar. The display format can be specified in the Draw mode. After selecting View and Date/Time Format the window shown on the left hand appears. Here the animation time unit and a starting time can be selected.") ?>
The step by step steady run of the animation time contains certain points when the runtime system
of Proof Animation gets new instructions.
Those points are defined by Time and DT commands in
the ATF.
At the start of the animation runtime the clock starts running at 0 and the first animation commands
(ATF-commands) are processed, which are placed at the beginning of the ATF.
The commands can create, put and move Objects. The runtime system controls started motions
until their end.
value | Animation time, that has to been wait for until executing the following commands |
value | Length of the time interval until the next actions take place. |
Time and DT are of essential meaning for the understanding of ATF's and shall be explained by the following example:
ge("Time 20 Bis zum Zeitpunkt 20 geschieht nichts. Create Circle C Ein Objekt der Klasse Circle mit Namen C wird erzeugt. Place C at 10 20 C erscheint auf dem Bildschirm an der Stelle x=10, y=20. DT 30 Bis zum Zeitpunkt 50 geschieht nichts. Destroy C C wird vernichtet und verschwindet vom Bildschirm. End Ende der Kommandofolge des Animationstracefiles.", "Time 20 Nothing happens till time 20. Create Circle C An Object of the class Circle and the name C is being created. Place C at 10 20 C appears on the screen at the position x=10, y=20. DT 30 Nothing happens till time 50. Destroy C C is being destroyed and disappears from the screen. End End of the sequence of commands of the ATF."); ?>
The ATF - Commands used in this example are explained in the following chapters.
In the following the already used ATF commands for creating, positioning and destroying objects are described.
classID | Name of the class, of which an object shall be created |
objectID | Name or number as identifier of the object |
x, y | Coordinates in the global coordinate system of Proof. They set the place for the center of the local coordinate system of the object. |
The commands that have been introduced are already enough to make objects move on the screen. Only a sequence of Time and Place at commands is necessary to move an object in small steps across the screen and by that give the impression of continuous motion. The user of Proof Animation is disburdened from this cumbersome way of describing motions. Objects can be
ge("Objekte auf Pfaden werden im nächsten Abschnitt behandelt. Im folgenden geht es um die Bewegung zwischen zwei Punkten", "Objects on paths will be explained in the next chapter. The following explains the motion from one point to another") ?>.
Operand | ge("Erklärung","Explanation") ?> |
---|---|
duration | is the duration of the motion |
s | is the speed (distance/time) |
relative | specifies that xtarget- and ytarget values are interpreted not absolute but relative to the origin point |
Time 20 20 time steps are executed Create Triangle T1 creates the triangle T1 Place T1 20 5 puts it on the location (20, 5) Move T1 30 80 5 moves it during 30 time steps to the location (80, 5) Time 30 Debug-Stop at T1(x)=20+(80-20)x(10/30)=40 Time 40 T1(x)=60 Time 50 T1(x)=80 Time 70 Move T1 20 10 15 T1 is moved obliquely up left Create Circle Cnew Cnew is created, Place Cnew 10 10 placed Move Cnew 20 80 10 and moved to the right. Time 80 Time 90 Time 100 Destroy Cnew Cnew is destroyed End
Define View "(Home)" center 40 30 Width 99.2969 Grid Size 1 10 Ortho Aspect 1 0.5 Speed 6 Define View "(Class)" center 0 0 Width 9.9297 Grid Size 0.1 1 Ortho Define color Backdrop 0.8 0.749 0.549 Define color F1 0 0 0.6667 Define color F2 1 0 0 ................ Color F1 Define Class Circle Arc 4 0 0 0 360 6.2832 Fill -0.5512 -1.3024 End Color F2 Define Class Triangle Line 0 4 -4 -4 Line -4 -4 4 -4 Line 4 -4 0 4 Fill 0.6512 -1.8364 End Color F7 Define Class Square Line -1.6 1.6 -1.6 -1.6 Line -1.6 -1.6 1.6 -1.6 Line 1.6 -1.6 1.6 1.6 Line 1.6 1.6 -1.6 1.6 Fill 0.0696 -0.6932 End Color F3 Line 0 26 86 26 Line 10 1 10 0 Line 30 1 30 0 Line 40 1 40 0 Line 50 1 50 0 Line 60 1 60 0 Text 1 1 LJ 0 -2 0 Line 86 0 0 0 Line 20 1 20 0 Text 1 1.2 LJ 9 -2 10 Line 86 26 86 0 Line 70 1 70 0 Line 80 1 80 0 Line 0 0 0 26 Line 0 10 1 10 Line 0 20 1 20 Color F2 Text 1 1.8 LJ 2 22 Layout23 Color F3 Text 1 1.2 LJ 79 -2 80 Text 1 1.2 LJ 49 -2 50 End
I advise to use the Debug Mode of Proof and process the ATF in single steps.
ge("Proof-Animationen kann man auch als Video speichern und vorführen. Wenn man hier klickt, sieht man die Animation aus dem aktuellen Beispiel.", "Proof animations can also be saved and presented as videos. Click here to view the animation of the current example.") ?>
During the animation runtime the color of an object can be changed e. g. to emphasize changes of state. For that the command Set Color is used.
Operand | ge("Erklärung","Explanation") ?> |
---|---|
objectID | ge("spezifiziert das zu färbende Objekt.","specifies the object to be colored.") ?> |
color | is the color which is coded by F1 to F32 (Foreground), L1 to L32 (Layout) and Backdrop for the default background color. The RGB-components of those colors can be changed selecting Setup->Colors. |
Class | restores the predefined color for this object class |
To understand color effects that occur when picture components collide a three layer model can be used.
ge("Innerhalb jeder Schicht überdeckt eine Farbe mit höherer Nummer alle Farben mit niedrigerer Nummer.", "Within one layer a color covers all colors with lower number.") ?>
Objects can be rotated on a spot or during the motion. The rotation is initiated by the ATF command Rotate. Similar to the Move command the runtime system of Proof Animation executes the execution of the process. It can be limited in time or unlimited. Time unlimited rotations end with the end of the animation run.
Operand | ge("Erklärung","Explanation") ?> |
---|---|
to | initiates the rotation from its actual position to the angle specified by angle. If the to is left out the object is rotated relative to its actual position by the specified angle |
angle | is the angle to rotate the object clockwise. |
duration | sets the duration of the rotation. |
rotspeed | sets the speed of the rotation in degrees/timestep. If the speed is set to 0 the rotation is stopped. |
stepsize | sets the quality of the representation of the rotation. It is preset to 30 degrees. If that is too coarse it can be changed by this operand. Please note that for every used direction a bitmap of the object has to be created. Too small steps can therefore cause an overflow of the bitmap memory. |
Rotate 1 to 50 rotates object 1 to 50 degree from normal position in no time. Rotate 1 -120 Time 10 rotates object 1 120 degrees clockwise and takes 10 timesteps for it Rotate 1 -120 Speed 12 does the same thing as the last command. Rotate 1 Speed 6 rotates the objects 6 degrees/ timestep without an end. Rotate 1 Speed -1 Step 6 rotates the object clockwise like a second hand.
The following picture shows the schematic representation of a vehicle that is originally moving in horizontal direction over the screen. Meanwhile the wheels are rotating with a rotation speed that has to be adjusted to the speed of the vehicle.
Color F1 Define Class Small Fill -4.7461 3.9453 Arc 0.8 -5.5 3.5 0 360 0 Arc 1 -5.5 3.5 0 360 0 End Color F11 Define Class Big Fill -16.8359 8.6563 Arc 10 -12.5 8 0 360 0 End Color F7 Define Class Medium Fill 7.3938 5.2258 Arc 5 9.5 5.5 0 360 0 End
Up to now Layout files and ATF's have been introduced as the probably most important files that Proof Animation works with. At this point an overview over important files that Proof can read or write is listed below.
Name | + | Content |
---|---|---|
Layout-File | LAY | Background picture, Paths, Classes, Messages, Bars and Diagram |
Animation Trace File | ATF | Animation commands controling the animation run |
Presentation File | PSF | Presentation commands for performing a presentation |
Log-File | LOG | Error messages from the animation run |
LinkageFile | LKG | Data about start and end positions and the length of Paths |
The column marked with a + contains the file extensions. The colors are used to mark files of the specific type and make them easier to identify.
Last Modified | Fri 05-27-11 06:54 GMT | |
English Translation: | K. Eidner |
Comments please to:pelosim@yahoo.com