One of the weird rabbitholes I fell into while working on the GJK implementation was figuring out how to find the nearest point on a tetrahedron to a query point. This also relates tightly to the idea of finding which Voronoi region a given point corresponds to–in fact, I elected to update my projection routine to also report which region a given point fell into.
The implementation of the thing itself is a bit annoying, since we have to calculate a bunch of barycoords and then figure out which domain (in increasing dimensionality) we may be falling into, but testing them is even more frought.
Create stub physics engine server in Elixir as a GenServer(done)
Create visualizer for engine state using Three.js and Phoenix Channels (done)
Add first body type to physics engine: boxes! (done)
Add framework for doing dynamics sans collisions in engine (done)
Add collision detection framework for finding contact manifolds (abandoned)
Add collision restitution code
Add friction
Add joints and motors
Add more types of bodies beyond boxes (we’re going full convex hull, God help me)
Figure out how to spread the simulation across multiple processes
Figure out how to spread the simulation across multiple nodes
Changing course
So, I kinda need a break on this. It’s been about ten weeks of banging on it, and the last few haven’t been nearly productive enough–my experience is telling me I need to either switch sub-tasks, or pull the ripcord entirely and switch to something else while I wrap up here at RC.
The current situation harms workers, it harms consumers and society, and somewhat unintuitively it hurts most employers themselves.
Problems for the worker
Developers unlock or maintain vast economies of scale for companies, allowing profits at scales almost unseen in the history of mankind. At the same time, it seems that developers are increasingly cut off from the fruits of their labor and treated more poorly than they deserve.
Create stub physics engine server in Elixir as a GenServer(done)
Create visualizer for engine state using Three.js and Phoenix Channels (done)
Add first body type to physics engine: boxes! (done)
Add framework for doing dynamics sans collisions in engine (done)
Add collision detection framework for finding contact manifolds
Add collision restitution code
Add friction
Add joints and motors
Add more types of bodies beyond boxes
Figure out how to spread the simulation across multiple processes
Figure out how to spread the simulation across multiple nodes
In the process of working through (and doing so. much. reading.) the issues with integrating angular velocity on a quaternion last week, I cut a new release (2.0.0) of Graphmath. Turns out we’d been doing quaternions basically entirely incorrectly, so this was a chance to fix that. Things I fixed:
After a few weeks of on-and-off work (maybe 2 weeks actual work punctuated by coder’s block and wonderful socializing here at RC), my timeline looks like this:
Create stub physics engine server in Elixir as a GenServer(done)
Create visualizer for engine state using Three.js and Phoenix Channels (done)
Add first body type to physics engine: boxes! (done)
Add framework for doing dynamics sans collisions in engine (in progress, more below)
Add collision detection framework for finding contact manifolds
Add collision restitution code
Add friction
Add joints and motors
Add more types of bodies beyond boxes
Figure out how to spread the simulation across multiple processes
Figure out how to spread the simulation across multiple nodes
I’m currently kinda blargh on this, since it’s a long road with a lot of work and not a lot of suprises. That said, it’s definetely a bit outside of my comfort zone and has been helping me improve my Elixir understanding (more intuition about processes, more knowledge about debugging, more familiarity with Phoenix Channels) and definitely brushing up on my physics.
I’m working at the Recurse Center on a 3D rigid-body game physics engine in Elixir.
What’s that mean?
3D is pretty self-explanatory.
Rigid-body means that the objects being simulated don’t deform due to collisions, so more like steel beams and less like wobbly jellyfish.
Game physics is meant to describe simulations that are both decent-enough in fidelity for humans to predict behavior of objects and low-enough in fidelity to run in real-time (say, 30-60Hz).
Engine means it should be reusable across other projects and have a clean API.
I want to see what features APIs some various engines support, and go from there. The API’s I’m looking at are: