GithubHelp home page GithubHelp logo

heman-theman / myphysicslab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from myphysicslab/myphysicslab

0.0 0.0 0.0 6.83 MB

myPhysicsLab provides JavaScript classes to build real-time interactive animated physics simulations

License: Apache License 2.0

Shell 0.20% JavaScript 89.11% Perl 0.67% CSS 0.32% TeX 0.69% Mathematica 5.61% Makefile 0.88% HTML 2.50%

myphysicslab's Introduction

myPhysicsLab README

myPhysicsLab provides JavaScript classes to build real-time interactive animated physics simulations.

The myPhysicsLab website shows the simulations running and contains explanations of the math behind them.

Author and License

myPhysicsLab is provided as open source software under the Apache 2.0 License. See the accompanying file named LICENSE. The author is Erik Neumann [email protected].

Source code is available at https://github.com/myphysicslab/myphysicslab.

Building

This software has only been built on MacOS. Building on any other platform (Windows, Linux) may be possible but will likely involve some significant modifications to the build instructions, and possibly to the makefile and other scripts.

It is possible to customize a myPhysicsLab simulation without building from source code, see Customizing myPhysicsLab Simulations.

To build from source code the required tools are

  • Java 7 or higher

  • Perl

  • GNU Make

  • Closure Compiler Note that you don't need to install Maven or NPM. Just go to their Maven repository, click on the version you want, then click on the jar file to download it. myPhysicsLab compiles with closure-compiler release v20210106.

  • Closure Library is a separate download from Closure Compiler. It is a collection of JavaScript source code. You can download a zip file from their github page or use git clone https://github.com/google/closure-library.git.

Once the prerequisites are on your system, follow these steps:

  1. Download the myPhysicsLab source code from https://github.com/myphysicslab/myphysicslab. You can download a zip file from that github page, or use git clone https://github.com/myphysicslab/myphysicslab.git

  2. Copy the file sampleConfig.mk to myConfig.mk and edit myConfig.mk to specify location of Closure Compiler in the CLOSURE_COMPILER variable.

  3. Create a symbolic link to closure-library in the directory that has the makefile. Example of how to create the symbolic link:

     $ ln -s ../closure-library/closure/ closure-library
    
  4. Execute make at the command line. (Set your directory to where the makefile is). This will compile all applications and tests in all language versions (using the default option COMPILE_LEVEL=simple). Execute make help to see available options.

  5. Open the file /build/index-en.html with a browser. This has links to all the files that were built.

NOTE: the HTML files in the source directories cannot be used directly from a browser. You must complete the build process first.

See Building myPhysicsLab Software for more information about the build process.

Documentation

See myPhysicsLab Documentation for overview of architecture and for detailed documentation of software.

Examples

There are around 50 different simulations in the source code, each of which has has an example file which is mainly for development and testing.

The example files are available online in two forms: advanced-compiled which loads faster and simple-compiled which allows for more customization.

myphysicslab's People

Contributors

myphysicslab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.