Skip to content

Schroedingers-Hat/jsphys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsphys: javascript physics simulation

Provides canvas-based JavaScript physics demonstrations for classroom use, including a live special relativity simulator.

Features

jsphys encapsulates a growing library of simulations and explanations of physical phenomena, from wave interference to special relativity.

Relativity simulation

jsphys provies a framework for relativistic demos, using predefined scenarios to demonstrate relativistic effects. Users can interact with the demos, changing their reference frames, zooming in and out, and changing the playback speed. Currently supported effects are:

  • Relativistic Doppler shifting
  • Length contraction of distances and of objects
  • Time dilation
  • Arbitrarily shaped objects
  • Minkowski diagrams of events as they unfold.

Planned effects include relativistic beaming and arbirary object paths. The simulator will also support audio narration, allowing users to step through demonstrations as they listen to explanations of what they're seeing.

Contributing

Send a pull request! The user interface could stand serious improvement, and our GitHub issue queue lists features and bugs that need to be worked on.

Requirements

jsphys uses features like canvas and JavaScript typed arrays, requiring a recent browser. It has currently been tested on recent versions of Firefox, Chrome, Safari, and Internet Explorer.

Demo

A demo of the work-in-progress version of jsphys is available:

http://schroedingers-hat.github.com/jsphys/index.html

About

Libraries for physics simulation on javascript canvas

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages