CCP2014: The deadline for contributed oral presentations has passed (June 15), but poster abstracts are accepted until July 31, 2014.
11-14 August 2014
US/Eastern timezone
Home > Timetable > Contribution details

EjsS: A JavaScript library which makes computational-physics education simpler

Presented by Prof. Felix J. GARCIA-CLEMENTE
Type: Poster presentation
Track: Computational-physics education


Nowadays, the teaching in computational physics is based on the usage of powerful instructional tools (e.g. Mathematica) and the programming in several software languages (e.g. Java) to do algebraic and numerical calculations, graphics and animations for a variety of mathematics and physics problems. However, the deployment of these animations requires that the author have training and skills in graphics programming, which could be too demanding in teaching scenarios. In this sense, we propose <em>EjsS (Easy JavaScript Simulations)</em> is a new Javascript library which makes the simulation of physics phenomena very easy. While a simple movement of a spring in raw programming language (e.g. WebGL or Java) would turn out hundreds of lines, an EjsS equivalent is only a fraction of that. Moreover, EjsS does not require that the author must have advanced knowledge in software programming because it includes an authoring tool, called <em>EjsS Editor</em> [1], to make the definition of simulations easier. The author uses <em>EjsS Editor</em> to define the physics model and to link model definitions to the components of the view. The editor includes 2D, 3D and UI elements, which include properties that can be linked to simulation variables. Also it is possible to define groups or sets to apply transformations to several elements together. Finally, the editor includes the automatic generation of code that integrates the simulation definition into the EjsS library. In relation to the technologies, EjsS is based on JavaScript and HTML5 and uses WebGL and SVG. Note it does not require other graphical libraries (e.g. Three.js) or UI library (e.g. jQuery), so EjsS is an independent library optimized to graphically show physics simulations. Therefore, it can be used in any web browser with HTML5 and WebGL support (currently, most of them) in any kind of device, such as smartphones or tablets. Moreover, the user could use the app <em>EjsS Reader</em> (available at iTunnes and Google Play) to organize his/her simulations and connect directly to the OSP Collection [2].


[1] Ejs Editor. Available at [2] Open Source Physics Collection. Available at



Primary authors