Giter Site home page Giter Site logo

verletintegration's Introduction

Verlet Integration (C)

ezgif com-video-to-gif (1)

Synopsis

This is an implementation of Verlet Integration, a numerical method commonly used for approximating trajectories. It's made with the C programming language and OpenGL, a popular API for GPU rendering. See here for the Python version (outdated).

Key Features

  • Simulate thousands of particles (at 60 FPS) experiencing real-time collisions, arbitrary forces, constraints, and linking.
  • First person camera that can be controlled using the mouse and keyboard or animated along a path (Bézier curve).
  • Custom OBJ file parser to import models from external applications and convert mesh data into an OpenGL-friendly data structure.
  • Substeps, mathematical approximations, and sampling for improved simulation accuracy and stability.
  • Algorithms to generate structures like recursive Icospheres.
  • Mouse picking with a custom frame buffer to interact with objects in a 3D scene.

ezgif com-video-to-gif

Optimizations

References

  1. Math module by Felipe Ferreira da Silva for working with vectors, matrices, and common mathematical functions.
  2. Implementation of KD-Tree spatial partitioning by John Tsiombikas.
  3. GLEW for "wrangling" OpenGL functions and GLFW for window management.

Applying/releasing an attractive force w/ the Keyboard

ezgif com-video-to-gif

Linking particles into a "Net"

ezgif com-video-to-gif (2)

Icosphere which maintains its pressure using Ideal Gas Law

ezgif com-video-to-gif (3)

System Specs.

  • MacBook Pro (13-inch, M1, 2020)
  • Chip - Apple M1
  • Memory - 8 GB
  • OS - Monterey Version 12.1

I have no idea if this will run on your machine but you're welcome to try by calling make in the root directory followed by ./app

verletintegration's People

Contributors

marichardson137 avatar thom-bahm 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.