Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vivio50 © 2004 - 1 19/11/04 Tock Tick - Running Interactive E-Learning Animations Backwards Jeremy Jones Dept. Computer Science Trinity.

Similar presentations


Presentation on theme: "Vivio50 © 2004 - 1 19/11/04 Tock Tick - Running Interactive E-Learning Animations Backwards Jeremy Jones Dept. Computer Science Trinity."— Presentation transcript:

1 Vivio50 © 2004 jones@cs.tcd.ie - 1 19/11/04 Tock Tick - Running Interactive E-Learning Animations Backwards Jeremy Jones Dept. Computer Science Trinity College Dublin 2 Ireland

2 Vivio50 © 2004 jones@cs.tcd.ie - 2 19/11/04 Overview Initial motivation for Vivio Some example Vivio animations How does it work? Conclusions http://cs.tcd.ie/Jeremy.Jones/vivio google: "jones vivio" + I feel lucky

3 Vivio50 © 2004 jones@cs.tcd.ie - 3 19/11/04 Initial Motivation How best to explain the operation of cache-coherency protocols * to Computer Engineering students? "I hear and I forget, I see and I remember, I do and I understand" [Confucius] Envisaged some 2D web based interactive reversible animations to complement lectures Students can use animations outside of lectures Engage students, encourage active learning & critical thinking and consequently improve learning outcomes Think before developing an interactive animation – NOT always appropriate * IEEE/ACM Computing Curricula 2001 section AR7 core

4 Vivio50 © 2004 jones@cs.tcd.ie - 4 19/11/04 Example Vivio Animations may be embedded in a PowerPoint presentation, … but easier to demonstrate inside a browserbrowser [image rather than Vivio ActiveX control]

5 Vivio50 © 2004 jones@cs.tcd.ie - 5 19/11/04 Animation Characteristics interactive scalable reversible web based parallel smooth animation control animation speed (via mouse wheel) single step forward and backwards snap forward and backwards to key frames standard hardware

6 Vivio50 © 2004 jones@cs.tcd.ie - 6 19/11/04 How can such animations be created? interactive execution of an underlying program reversible need to be able to execute program backwards (or give the appearance thereof) very time consuming with existing technologies such as Java, Flash, SVG,...

7 Vivio50 © 2004 jones@cs.tcd.ie - 7 19/11/04 Vivio A programming language / model that provides an appropriate level of abstraction for describing E-Learning animations An efficient runtime which handles the low level detail e.g. repainting the screen and playing animations in reverse

8 Vivio50 © 2004 jones@cs.tcd.ie - 8 19/11/04 How does it work? Vivio source code compiler ActiveX player * (runtime) Vivio IDE * may be hosted in a web page, Word, PowerPoint, … vcode Vivio source code compiled and stored as compressed vcode files (most examples less than 4K) ActiveX player downloads the vcode, JIT compiles it into x86 machine code and then executes the generated code Runtime only for Windows and x86 (so far!)

9 Vivio50 © 2004 jones@cs.tcd.ie - 9 19/11/04 Vivio Language Basics normal –int, real, string, class –arrays, associative arrays –functions, while, for, … animation specific –graphical objects (rectangles, ellipse, polygon, …) –groups, layers –animation clock –animated functions –fork(…)

10 Vivio50 © 2004 jones@cs.tcd.ie - 10 19/11/04 Event Driven / Event Q animation clock @ t ticks per second (tps) on each tick execute attached event code (x) and then… render changes (r) executed code can add events to the eventQ typical render time >> execute time aggressive code to minimise rendered screen area no point rendering at rates > 100 tps xxrxrxxr tick 0tick 1 tick n xxr tick n+2tick n+1

11 Vivio50 © 2004 jones@cs.tcd.ie - 11 19/11/04 Animated Functions r = Rectangle(…..) r.setpos(x, y, steps, interval, wait) setpos(…) sets position of r in steps steps with interval ticks between each step (linear interpolation from current position) if wait = 1 execution waits until animation completes, otherwise execution continues immediately to the next statement r.setpos(x, y) r.setpos(x, y, 0, 0, 0) most functions, where it makes sense, exist in animated form consider an exampleexample

12 Vivio50 © 2004 jones@cs.tcd.ie - 12 19/11/04 Running Backwards 1 tick ntick 0 tick n-1 save state (SS) animate forward at normal speed wish to go back one tick NB. state saved at tick = 0 [in reality state saved when each object changes for the first time]

13 Vivio50 © 2004 jones@cs.tcd.ie - 13 19/11/04 Running Backwards 2 restore saved state at tick = 0 fast forward by re-executing all events until tick n-1 save state at regular intervals – every t ticks or t ms of "execution" time render changes tick n tick 0 SS tick n-1

14 Vivio50 © 2004 jones@cs.tcd.ie - 14 19/11/04 Running Backwards 3 tick 0 SS restore last saved state fast forward by re-executing events until tick n-2 render changes tick n-2 tick n-1 tick n

15 Vivio50 © 2004 jones@cs.tcd.ie - 15 19/11/04 Saving State 1 incremental state saving (snapshots) save changes only technique also applied to non graphical objects created tick = 0 current state rendered state snapshots tick = 5000 state tick = 4000 state tick = 1000 state tick = 0 state graphical object last updated tick = 0

16 Vivio50 © 2004 jones@cs.tcd.ie - 16 19/11/04 Saving State 2 reduce "execution" time by saving state more frequently and by saving state more frequently closer to target tick (t/N) set save state parameters at runtime setSSParameters(tickOrMS, interval, nsubintervals) could use an alternative strategy e.g. binary tick 0 0 t 2t tick n 3t 3t+t/2 3t+t/4 3t+3t/4 SS tick n-1 4 sub intervals

17 Vivio50 © 2004 jones@cs.tcd.ie - 17 19/11/04 Playing Forward vs Backwards redraw region going forward tick n to tick n+1 redraw region going backwards from tick n to tick n-1 same screen area rendered whether going forward or backwards – hence equal render times (not quite so easy to implement!) more time spent in "execution" phase when playing backwards (set by frequency of state saves)

18 Vivio50 © 2004 jones@cs.tcd.ie - 18 19/11/04 Some Performance Measurements 1 playing forwardsplaying backwards vcode size (bytes) # frames avg exe (ms) avg render (ms) # frames avg exe (ms) avg render (ms) ExchangeSort1,9042,9930.024.152,9901.124.09 WriteOnce2,66510050.049.319632.949.37 DLX/MIPS11,8963,3620.043.433,3601.813.60 Vivio IDE instrumented to collect real time statistics using the Intel x86 hardware time stamp counter measurements collected on a DELL Inspiron 8100 laptop with 1.13GHz mobile Pentium III and 256K DRAM (N.B. SpeedStep technology) "avg exe (ms)" - everything apart from render time (i.e. executing event code, saving/restoring state,...) all animations displayed in an 800x600 32 bits per pixel window and run at 100 ticks/sec save state every 1024 ticks with 0 subintervals except DLX every 512 ticks with 8 sub intervals Note the "identical" render times playing forwards and backwards

19 Vivio50 © 2004 jones@cs.tcd.ie - 19 19/11/04 Some Performance Measurements 2 playing forwardsplaying backwards vcode size (bytes) # frames avg exe (ms) avg render (ms) # frames avg exe (ms) avg render (ms) ExchangeSort1,9042,9930.022.052,9900.652.03 WriteOnce2,66510050.033.699631.863.72 DLX/MIPS11,8963,3620.032.743,3600.992.74 Vivio IDE instrumented to collect real time statistics using the Intel x86 hardware time stamp counter measurements collected on a DELL Dimension 8300 with 3.00GHz Pentium 4, 1GB DRAM and NVidia GeForce Fx 5200 graphics card "avg exe (ms)" - everything apart from render time (i.e. executing event code, saving/restoring state,...) all animations displayed in an 800x600 32 bits per pixel window and run at 100 ticks/sec saving state every 1024 ticks with 0 subintervals except DLX every 512ticks with 8 sub intervals Note the "identical" render times playing forwards and backwards

20 Vivio50 © 2004 jones@cs.tcd.ie - 20 19/11/04 Some Performance Measurements 3 playing backwards intervalnsubintervalsavg exe (ms)avg render (ms) 102403.312.74 102441.522.74 102481.212.73 1024161.062.74 51202.232.75 51241.272.74 51281.092.73 512160.992.74 conditions as per previous slide "avg exe" time vs save state parameters for DLX/MIPS animation

21 Vivio50 © 2004 jones@cs.tcd.ie - 21 19/11/04 Conclusions How frequently are the Vivio animations used? –installation/portability issues Are the animations beneficial educationally? –survey results How long does it take to create an animation? –took 3 months for Edsko De Vries (JS BA) to create the MIPS/DLX animation MIPS/DLX What next?

22 Vivio50 © 2004 jones@cs.tcd.ie - 22 19/11/04 Thank you for listening. Any Questions?


Download ppt "Vivio50 © 2004 - 1 19/11/04 Tock Tick - Running Interactive E-Learning Animations Backwards Jeremy Jones Dept. Computer Science Trinity."

Similar presentations


Ads by Google