Giter VIP home page Giter VIP logo

physics_rolling-ball-simulation's Introduction

Simulation of a rolling ball

Running

  1. Install python 3.6 or later (needs format strings and type hinting)
  2. Set up a virtualenv: virtualenv .venv and source .venv/Scripts/activate
  3. Install dependencies pip install -r requirements.txt
  4. Run what you want (see below).

There are multiple files to run.
You can run a jupyter notebook for some graphs and lots of sample code: jupyter notebook then open Test data.ipynb.
Or run one of the three main files with python: find_best_braking_factor.py, plot_numerical_model.py, obstacle_height_tester.py.

A rendered version of Test data.ipynb can be found in Test data.html, so you don't need to run jupyter to see the results.

Explanation

The braking factor is a coefficient used in acceleration to simulate drag and other sources of energy loss.
The ball is rolling, not sliding.
The track is represented with a parabola.
The goal was to elevate the center of the parabola to a certain height, where the ball could pass exactly twice.

Graphs and stuff

Calculated values and a simulation:

Calulated values

A gif of a rolling ball, with no obstacle:
Rolling ball

A gif with an obstacle:
Rolling ball with obstacle

physics_rolling-ball-simulation's People

Contributors

krissrex avatar

Watchers

 avatar  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.