Code Monkey home page Code Monkey logo

rigidbodytutorial's Introduction

SIGGRAPH'22 Course on Contact and Friction Simulation for Computer Graphics

Tutorial: Rigid Body Simulation with Contact and Friction

Rigid body sim

A tutorial on implementing a simple C++ rigid body simulator.

The tutorial follows Appendix A from the SIGGRAPH'22 Course on contact and friction simulation for computer graphics.

CMake is used to build the main application. To build and run the code, first create a sub-directory:

> mkdir build

Then, configure the project for the specific build target:

> cd build
> cmake -DCMAKE_BUILD_TYPE=Debug ..

Finally, compile using your favorite build tool or IDE, e.g.

> make

The code has been compiled and tested on Windows (MS Visual C++ 2019), Ubuntu Linux (g++ 9.3 with VS Code), and MacOS (Clang)

Dependencies

The following dependencies are included and compiled automatically (see the 3rdParty directory):

Source code

solvers/

Implementations of a matrix-free Projected Gauss-Seidel (PGS) solver for boxed LCPs (see SolverBoxPGS.h/.cpp)

collision/

The CollisionDetect.h class handles collision detection and contact generation for all pairs of simulation bodies. For this tutorial, the following geometries are supported:

  • Spheres
  • Boxes

And you will implemented collision handling for the following geometry pairs:

  • Sphere-sphere
  • Sphere-box

contact/

Implementation of the box friction cone model (see Contact.h/.cpp).

rigidbodytutorial's People

Contributors

erleben avatar sheldona avatar siggraphcontact 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.