APS Excellence in Physics Education Award
November 2019

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 6 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 May 3, 2021

This file has previous versions.

Primary Documents

Mass and Spring EPub (beta) 

An ePub containing the Mass and Spring with Accelerometer simulation.

Released under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.

Last Modified July 28, 2018

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 May 3, 2021

This file has previous versions.

Simple Vertical SHO Model 

A simple SHO simulation without narrative for classroom use.

Last Modified May 3, 2021

This file has previous versions.

Simple Horizontal SHO Model 

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

Last Modified May 3, 2021

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 January 5, 2024

This file has previous versions.

OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book