Giter Club home page Giter Club logo

physics_engine's Introduction

A Physics Engine

A school project. This is a simulation with a cube.

Installing

To run it on a unix-based operating system, run:

./gradlew run

On Windows, run:

./gradlew.bat run

This requires having the Processing Library installed and the path to the jar files updated in app/build.gradle in the repositories section.

To run a distribution, download a zip file from the releases section. Unzip it, and run the bin/App (or bin/App.bat on Windows) script.

Controlling the simulation

The left and right arrow keys apply forces on the red square. The spacebar toggles friction and air resistance.

Physics Principles

  1. Elastic collisions conserve momentum and energy
  2. Air resistance eventually cancels out the other forces acting on an object, resulting in terminal velocity
  3. Static friction force is equal and opposite to the sum of the other forces in the plane of the surface
  4. Normal force is equal and opposite to the net force exerted on the ground
  5. With a constant force, acceleration is constant, and velocity continuously increases

Goals

  • Don't worry about heat
  • Make idealistic assumptions
  • Update to a up-to-date version of Java (for LSP purposes)
    • Decouple from Processing
    • Move to a different graphics package
  • Rotational Motion
  • Simple Harmonic Motion

physics_engine's People

Contributors

parmort avatar

Watchers

 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.