We introduce the Easy Java Simulations (EJS) edition of An Introduction to Computer Simulation Methods and discuss the importance of computers in physics and the nature of computer simulation. Various computer languages are considered and we show how the EJS modeling and authoring tool allows us to separate the model into logical parts and to separate the model from the view. Students learn the logic of computer modeling using loops and control structures as they study algorithms used in professional practice. Students are also introduced to object-oriented programming concepts by using object properties and methods when they create user interfaces. However, little user-interface coding is required because the user interface is created automatically by EJS.
Easy Java Simulations is built using the Open Source Physics code library and produces XML-based source code. The use of XML is important because it enables users to describe and store the model at a high level of abstraction, thereby leaving the Java implementation to EJS. A tutorial at the end of Chapter 1 describes this process.
Please note that this resource requires
at least version 1.5 of
An Introduction to Computer Simulation Methods - Draft EJS edition
CSM Textbook Chapter 1: Tutorial example
The ready-to-run Mass and Spring model shows the motion of a mass m situated at the end of a spring of length L and negligible mass. The motion is restricted… more... download 1205kb .jar
Last Modified: June 4, 2014
CSM Textbook Chapter 1: Tutorial example source code
The source code zip archive contains an XML representation of the EJS Mass and Spring model. Unzip this archive in your EJS workspace to compile and run this… more... download 15kb .zip
Last Modified: August 21, 2009
W. Christian, EJS CSM Textbook Chapter 1: Introduction to modeling, in An Introduction to Computer Simulation Methods - Draft EJS edition (2009), <http://www.compadre.org/Repository/document/ServeFile.cfm?ID=9371&DocID=1262>.
Christian, W. (2009). EJS CSM Textbook Chapter 1: Introduction to modeling. In An Introduction to Computer Simulation Methods - Draft EJS edition. Retrieved May 29, 2015, from http://www.compadre.org/Repository/document/ServeFile.cfm?ID=9371&DocID=1262
%0 Book Section %A Christian, Wolfgang %D 2009 %T EJS CSM Textbook Chapter 1: Introduction to modeling %B An Introduction to Computer Simulation Methods - Draft EJS edition %U http://www.compadre.org/Repository/document/ServeFile.cfm?ID=9371&DocID=1262
Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.
It is a remixed / further development by lookang from the tutorial now called CSM Textbook Chapter 1: Introduction to modeling for the purpose of creating a teacher designed learning environment for use as virtual lab.
remixed From an EJS manual example from D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_examples\Manual\Spring.xml and D:\EasyJavaSimulation\Ejs3.46_070428\Ejs\Simulations\_examples\Manual\SpringAdvanced.xml by Author : Francisco Esquembre
Thanks to Francisco Esquembre, Fu-Kwun Hwang and Wolfgang Christian for their guidance and support :)