Pirate Ship JS Model Documents

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

Main Document

Pirate Ship JS Model 

written by Michael R. Gallis

The Pirate Ship JavaScript Model is a JavaScript implementation of the Java version of the same model.  These simulations were inspired by the Pirate Ride at Hershey Park. The "ship" part of the ride has a center of mass that lies 14 m from the pivot point (approximately the center of the boat). The ship swings freely from the pivot, and is driven by a roller built into the floor directly below the ship. The operator presses either the clockwise torque button or the counter clockwise torque button to change the motion of the ship. Because the drive can only push the ship when it is in contact, the drive is only available when the ship is within 30ยบ of its lowest position. The drive buttons are grey when no drive is available (simulation is paused or the ship does not contact the drive roller), the turn white when the drive is available. When drive button is pressed, it turns green and a constant torque is exerted on the ship until the button is released or until the ship moves out of contact with the drive roller. Note that torque can not be applied if the simulation is paused or has not been started.

The Pirate Ship JavaScript Model was developed using the Easy Java Simulations (EjsS) version 5.  It is distributed as a ready-to-run html page and requires only a browser with JavaScript support.

Last Modified October 3, 2014

This file has previous versions.

Primary Documents

Pirate Ship Ride ePub 

An ePub containing the Pirate Ship Ride simulation.

Last Modified July 28, 2018

This file has previous versions.

Source Code Documents

Pirate Ship JS Source Code 

This source code zip archive contains an XML representation of the Pirate Ship JS Model.   Unzip this archive in your Ejs workspace to compile and run this model using EjsS 5.  Although EjsS is a Java program, EJ=jsS 5 creates a stand-alone JavaScript program from this source code.

Last Modified October 3, 2014

This file has previous versions.