Simulation of a Solar System in the subject called Modelling of virtual reality Attila Friedel friedel@gdf.hu Dennis Gabor College Erasmus IP 2013, Finland
Introduction Dennis Gabor College IT Engineer prerequisites Linear algebra (matrixes) Computer graphics (Blender) Modelling of virtual reality 7 th semester facultative
Modelling of Virtual Reality Theory definition of Virtual Reality and containing terms, VR history using VR, advantages and disadvantages, means 360 panoramic pictures, 3D pictures and films, 4D films, holography, 3D modelling programmes Agumented Reality, AR requirements, types of AR, using AR, future of AR overview of WebGL, and Java graphics possibilities DirectX and OpenGL languages
Modelling of Virtual Reality Practice Blender VRML 2.0 HTML5 canvas and JavaScript Java2D, Java3D C# and DirectX C++ and OpenGL
Modelling of Virtual Reality Curriculum
Overview software development related curriculum specification theoretical background planning implementation testing ways to improve
Specification Modelling and simulating of stable Solar System, working on the principle of gravitation finite sequence of discrete steps size distortion speed acceleration notional positions works continuously without user interaction event handling (size, rotation) no extra exception handling
Theoretical background 1. Gravitation F G grav m1m 2 d 2 Other ways Kepler s laws system of differential equations
Theoretical background 2. Uniform treatment of homogeneous coordinates for affine transformations P x, y, z P w x, w y, w z, w P x, y, z,1
Theoretical background 3. Transformations coordinate transformations changing of viewpoint the object doesn t change the mapping needs to repeated again examples shifting rotation mirroring scale changing interchanging of coordinate axes
Theoretical background 4. Transformations point transformations examples shifting scaling rotation moving
Theoretical background 5. The general form of affine transformations (matrix) 1 ' ' ' 1 0 0 0 1 33 32 31 23 22 21 13 12 11 z y x b t t t b t t t b t t t z y x z y x
Theoretical background 6. MVC pattern
Planning Model
Planning View and Controller
Implementation 1. HTML5 + JavaScript fast, proof of concept code runtime environment web browser modern, smart, mobile devices main focus just works experiment to create a stable system
Implementation 1. HTML5 canvas buttons and their events JavaScript data structure / datamodel gravitation and acceleration drawing timer/dispatcher and its event debugging developer tool: Notepad++, Firefox
Implementation 1. - User interface
Implementation 1.
Implementation 1.
Implementation 2. Java2D swing technology, desktop program packages created with MVC pattern logical distribution of functions object-oriented principles interfaces, encapsulation, inheritance, use of polimorphism main focus on beautiful, elegant code developer tool: JDK, NetBeans
Implementation 2. - User interface
Implementation 2.
Implementation 2.
Experiences, summary 10 frame/sec, runs in mobile browsers comparison type restriction expandability abstraction suitable for deepen the theoretical knowledge strengthen the links between subjects and topics achieve fast, spectacular result
Enhancement opportunities hardware acceleration and 3D visualisation changing multiple parameters on the UI runtime maintenance of orbs using textures real startup position start and stop function Java3D, DirectX, OpenGL variants reading parameters from file case study of famous conjunctions improved mathematical model
References (in Hungarian) [1] Virtuális valóság modellezése Tantárgyi útmutató: http://ilias.gdf.hu/repository.php?ref_id=41199&cmd=sendfile (bejelentkezve érhető el) [2] GDF ILIAS: http://ilias.gdf.hu [3] A cikkhez tartozó programok: http://kaczursandor.hu/vv3d [4] HTML5 Canvas tutorials: http://www.html5canvastutorials.com [5] Homogén koordináták és transzformációk: http://www.agt.bme.hu/szakm/szg/homogen.htm [6] Kaczur S., Kopácsi S.: Practical application of coordinate and dot transformations, A GAMF Közleményei, Kecskemét, XXIII. évf., 2008, HU ISSN 1587-4400, p. 121-126 [7] Kaczur S.: Programozási technológia, Budapest, 2010, ISBN 978-963-06-8628-0 [8] Budai A., Vári Kakas I.: Számítógépes grafika (3.1.3. A modelltér transzformációi, 88), INOK Kft., Budapest, 2007, ISBN 978 963 9625 32 7 [9] Berke J., Hegedűs Gy. Cs., Kelemen D., Szabó J.: (5.3. Koordináta-transzformációk, 78), Veszprémi Egyetem Georgikon Mezőgazdaságtudományi Kar, Keszthely, 2002 [10] Hack F.: 3D-grafika geometriai alapjai (2. Koordinátatranszformációk, 19), ELTE, Budapest, 2002 [11] Kondorosi K., László Z., Szirmay-Kalos L.: Objektum-orientált szoftverfejlesztés, ComputerBooks, Budapest, 1997 [12] Horváth L., Szlávi P., Zsakó L.: Modellezés és szimuláció, ELTE IK, Budapest, 2006
Simulation of a Solar System in the subject called Modelling of virtual reality http://sirgeoff.homelinux.net/ip2013 Attila Friedel friedel@gdf.hu Dennis Gabor College Erasmus IP 2013, Finland