Just Math - A collection of pure math demos.
The goal of Just Math is to provide both a visual example and code demonstrations of specific concepts in computer graphics, mathematics, simulation and AI.
Nov 22, 2025 - Faster and simpler builds. Clean re-commit. Reduced download from 150MB to ~12 MB.
Sep 16,2023 - Obj materials sample added.
Aug 12,2023 - G-coder sample added.
Mar 13,2023 - Bilinear Patch intersection sample added.
Feb 7, 2023 - Artificial Neural Network sample added. PS: For fun I wrote the original wikipedia article for Tensor (machine learning).
Each sample in Just Math demonstrates a specific concept in code and visually. The samples provided are briefly described:
- 3DDDA - 3D Differential Analyzer. March through a volume to identify voxels on a line.
- ANN - Artificial Neural Network learning the sine function.
- Basis - Orthonormal bases. Transformation from one space to another using bases.
- Bilinear Patch - Fast raytracing of a bilinear patch (curved quad defined by 4x points).
- Cells - Cellular membrane simulation. Simulated with physics using circles for cells.
- Deform - 3D spatial deformations, including bending, twisting and folding.
- Gcoder - Generation of CNC toolpath g-code from depth images.
- InvK - Inverse Kinematics using quaternions. Demo of robot and human arm IK.
- Obj Materials - Reads and renders 3D meshes (.obj) with their material (.mtl) definitions.
- QuatSquad - Quaternion Squad. A C1 continuous method for interpolating orientations.
- QuatTrajectory - Trajectory interpolation of both position and orientation, using B-Splines, Bezier Curves, and Catmull-Rom splines for position. Slerp or Squad for orientation.
- Raycast - Rendering of a 3D volume with an opacity-based volume integral, on CPU.
- Voxelizer - Voxelization of triangle into a volume, using several methods.
- WangTiles - Sampling of spatial distribution functions with scale invariance.
- WangTiles3D - Alternative demo of Wang Tiles for 3D geometry instancing over a density map landscape.
Updated Nov 2025
Build with cmake is now simpler and faster.
Libmin dependent code is now directly compiled with each project (no shared or static libs).
Steps:
- Clone this just_math repo
- Clone libmin as a sibling folder
\codes ├── \just_math └── \libmin
- Run cmake or cmake-gui on specific sample folder.
Let me know if you have any issues building.
Feel free to contact me if you have any questions, comments or suggestions:
Rama Hoetzlein
Website: ramakarl.com
Email: [email protected]
MIT License.
Copyright 2007-2024 (c) Quanta Sciences & Rama Hoetzlein
The Just Math samples are MIT Licensed.
Libmin is MIT Licensed with contributions from other BSD and MIT licensed sources.