Skip to content

waresnew/physics-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Physics Engine

Preview

Rigid cuboid simulation and rendering using Rust and WGSL.

Features

  • Freely adjustable first-person camera.
  • Efficient broad-phase collision detection using spatial hashing.
  • Collision manifold calculation using Sutherland-Hodgman face clipping.
  • Simple per-face directional lighting with Lambertian diffuse and Blinn-Phong specular highlights.
  • Iterative impulse solver that respects conservation of momentum.
  • Rotation changes calculated using quaternions to avoid gimbal lock.

Showcase

The videos will look a bit blurry due to compression, but they are not sped up/processed.

Grid

smallgrid.mp4

Slanted Tower

slantedtower.mp4

Meteor

meteor.mp4

Inverted Meteor

invertedmeteor.mp4

Catapult

catapult.mp4

Sticks

sticks.mp4

Platforms

platforms.mp4

Cube

cube.mp4

Cube with 10k mini cubes

10kcube.mp4

About

Rigid cuboid simulation from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published