thimni

Crates.iothimni
lib.rsthimni
version0.3.2
created_at2025-06-25 17:09:24.163967+00
updated_at2025-09-13 14:19:14.48457+00
descriptionefficient SDF collision without discretizatio, neural nets, or interval arithmetic
homepage
repositoryhttps://codeberg.org/0x177/thimni
max_upload_size
id1726203
size84,509
Kamal Al-Ameri (0x177)

documentation

README

thimni

crates.io Docs

a library for SDF collision

the core (and most likely novel) algorithm provides efficient SDF collision, whose memory usage does not scale with complexity of SDFs, by exploiting isotropy of hyperspheres

performance

benchmarked on i7-7700HQ

benchmark average speed
1000 random spheres colliding 5 milliseconds
100 random menger sponges colliding 100 milliseconds

features

  • can use any vector type implementing the Vector trait, with implementations for glam::Vec2 and glam::Vec3 provided
  • SDFs treated as black boxes (i.e. anything that takes a position, returns a number, and can be bounded by an AABB, can implement the SDF trait)
  • arbitrarily combined SDFs
  • binary collision between arbitrary SDFs of the same dimension
  • monte carlo penertration depth approximation
  • raycasting

the core algorithm

this devlog contains details on how the core algorithm works

DEMO

this devlog contains a link to a demo i made for this algorithm, consisting of a destructable fractal and a capsule representing the player.

Commit count: 0

cargo fmt