GithubHelp home page GithubHelp logo

engino's Introduction

EnGino

Personal Physics Engine.
Current state:
Quick render

Currently there are two different implementations of position calculus.
It still is a WIP, and will be for a long time.

Features:

  • ObjectSpawners are configurable in spawn-rate, spawn position and spawned-object size.
  • Pressing the right mouse button on an object will focus the camera on it.
  • Possibility to Render a simulation.
  • More to come.

Thanks to topongo, in order to Render a simulation it's only necessary to change the "render directory" in main.cpp and in script.py and run the script with

python3 script.py 

in the project directory.

Normal method

Movement is calculated with normal time law of motion.
Collision response utilizes the correct equations, meaning that it simulates as good as possible the correct directions and modules of velocity of the objects colliding.
Currently utilizes a restitution coefficient that simulates energy loss during collisions.

Verlet's integration

Using Verlet's integration, the object's position and collision response is approximated, meaning that it's not "accurate" in terms of physics simulation but faster computational times.

Rendering

With the Render class it's possible to render each frame (framerate is modifiable) and save it in a user-specified directory.
Then by using ffmpeg a video can be created from the frames rendered.

TODO

  • Calculate correct energy loss at collision.
  • Implement Sweep and Prune algorithm for object collision detection.
    Now the engine is able to sustain stable 60-fps in real-time rendering up to 1000 objects (before 300 was the limit).
  • Add different object types and the respective object collision.
  • Implement total energy level.
  • Implement rotational objects and fixed objects.

engino's People

Contributors

degra02 avatar

Stargazers

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