Work-in-progress physics toy, written (mostly) from scratch. Personal project, with inspiration from Handmade Hero.
Playable web build running on WebAssembly and WebGL. Built using Rust's Emscripten backend.
My original intent with this project was to render a citrus fruit that could be siced by the user, revealing the intricate internal structure. At some point early on, I decided it would be cool to add simple physics.
Turns out "simple physics" is a deep rabbit hole, and has been the focus of the project since then. The current implementation is the most basic thing possible: impulse-based with no global constraint solver. Despite this, it's surprisingly stable, and without a concrete use-case to evaluate it against, I'm happy with where it stands as a jack-of-all.
I was also able to take advantage of the simple shape and implement many functions using geometry and analysis. Almost everything to do with the lemon is computed in closed-form; raycasting and inter-lemon collisions use much of the same reasoning, but require some iterative computations.
Moving forward, I'm looking to switch gears and focus on graphics. In particular, I want to experiment with non-photorealistic visual styles which are naturally suited to the uniform patterns of a lemon's surface and interior.