Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Mass and Spring Simple Harmonic Oscillator JS Model Documents

This material has 5 associated documents. Select a document title to view a document's information.

Main Document

Horizontal Mass and Spring Simple Harmonic Oscillator JS Model 

written by Wolfgang Christian, Francisco Esquembre, and Colleen L. Countryman

The Mass and Spring Simple Harmonic Oscillator mobile JavaScript model illustrates the forces and dynamics of a simple oscillator. This simulation uses  the accelerometer on mobile devices to read the direction of the gravitation field g. You may, of course, need to lock the orientation of your screen to maintain a fixed view as you rotate your device. For use on computers without an accelerometer or for classroom use, the demo mode simulates a gravitational field in the y-direction.

The Mass and Spring Simple Harmonic Oscillator mobile JavaScript Model was developed using version 5 of the Easy Java Simulations (EJS 5) modeling tool. Although EJS is a Java program, EJS 5 creates stand alone JavaScript programs that run in almost any browser.

Published August 22, 2016
Last Modified December 2, 2016

This file has previous versions.

Supplemental Documents (3)

Vertical Mass and Spring Simple Harmonic Oscillator JS Model 

The Mass and Spring Simple Harmonic Oscillator mobile JavaScript model illustrates the forces and dynamics of a simple oscillator. This simulation uses  the accelerometer on mobile devices to read the direction of the gravitation field g. You may, of course, need to lock the orientation of your screen to maintain a fixed view as you rotate your device. For use on computers without an accelerometer or for classroom use, the demo mode simulates a gravitational field in the y-direction.

The Mass and Spring Simple Harmonic Oscillator mobile JavaScript Model was developed using version 5 of the Easy Java Simulations (EJS 5) modeling tool. Although EJS is a Java program, EJS 5 creates stand alone JavaScript programs that run in almost any browser.

Last Modified December 7, 2016

This file has previous versions.

Simple Vertical SHO Model 

A simple SHO simulation without narrative for classroom use.

Last Modified December 8, 2016

This file has previous versions.

Simple Horizontal SHO Model 

A simple horizontal model without narrative for in-class discussion.

Last Modified December 8, 2016

This file has previous versions.

Source Code Documents

Horizontal SHO with Accelerometer Source Code 

The Horizontal SHO with Accelerometer source code archive contains an XML representation Horizontal SHO with Accelerometer for use with EJS.   Unzip this archive in your EJS workspace to compile and run this model using EJS 5.  Although EJS is a Java program, EJS 5 creates a stand alone JavaScript program from this source code.

Last Modified November 8, 2016

This file has previous versions.

The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics