30.07.2013 Views

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Fundamentals</strong>. Two-Dimensional <strong>Design</strong><br />

Example: Clock Ticking Animation<br />

674<br />

A simple and instructive example of using animation for<br />

simulating a mechanism motion can be a model of a<br />

clock. This model is provided with the library<br />

“Documentation samples”, the folder “\<strong>2D</strong><br />

<strong>Design</strong>\Animation\Watch\”. The model<br />

contains an animation screenplay, modeling a working<br />

clock: moving arms and changing date.<br />

To animate the model, the variables “a” and “Date” are<br />

introduced. The variable “a” defines the current time in<br />

seconds (it will drive the position of the clock arms),<br />

while the “Date” variable – the figure displayed in the<br />

date dial of the clock.<br />

The clock arms and the date dial are 3D fragments.<br />

Since the arms are supposed to rotate in the animation,<br />

each arm fragment has an angle parameter defining the<br />

angle of rotation with respect to the Z axis via an<br />

expression dependent on the variable “a”: for the<br />

seconds arm it is “-6*a”, for the minutes one - “-a/10”,<br />

and for the hours – “-a/120”.<br />

The date dial fragment must update the displayed figures<br />

during the animation. For this purpose, an external<br />

variable “Date” is created in the fragment, defining the<br />

numeric figures in the fragment. Upon assembling the<br />

fragment, this variable is commanded by its namesake in<br />

the assembly.<br />

The animation is supposed to simulate the time from<br />

23: 55 to 0:01. During the animation, besides the arms<br />

motion, the date shall change on the date dial (at the<br />

midnight).<br />

Therefore, two independent variables, “a” and “Date”,<br />

shall vary their values. The model is “animated” by the<br />

“Animation Screenplay” application, taking into the<br />

account this mentioned feature.<br />

The “Clock” animation screenplay uses the variation diagrams for the variables “a” and “Date”. The<br />

animation time interval T is assumed from 0 (5 minutes before midnight) to 360(1 minute of the midnight).<br />

The time T=300 corresponds to the midnight, that is the moment of changing date. The variable diagrams are<br />

created according to the following tabulated values:<br />

T 0 300 360<br />

a, 0<br />

-300 0 60<br />

T 0 300 360<br />

Date 31 31/1 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!