Home

Awesome

just_math

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.

Copyright 2007-2023 (c) Quanta Sciences, Rama Hoetzlein, <a href="http://ramakarl.com">htpp://ramakarl.com</a>. MIT License.<br> Contact: ramahoetzlein@gmail.com

Sample Gallery

<div style="display:flex"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_3ddda.JPG" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_basis.JPG" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_bp.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_cells.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_deform.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_invk.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_quatsquad.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_raycast.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_trajectories.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_wangtiles.jpg" width="200"> <img src="https://github.com/ramakarl/just_math/blob/main/gallery/img_wangtiles3d.jpg" width="200"> </div>

Just Math Samples

Each sample in Just Math demonstrates a specific concept in code and visually. The samples provided are briefly described:

News & Updates

UPDATES: <br> Dec 5, 2023 - Build steps confirmed working with latest libmin repo and Visual Studio 2019 in Dec 2023 for all samples. Removed <a href="https://github.com/ramakarl/libmin">libmin</a> from this repo and put into its own separate repository.<br> Sep 16,2023 - Obj materials sample added.<br> Aug 12,2023 - G-coder sample added.<br> Mar 13,2023 - Bilinear Patch intersection sample added.<br> Feb 7, 2023 - Artificial Neural Network sample added. PS: For fun I wrote the original wikipedia article for <a href="https://en.wikipedia.org/wiki/Tensor_(machine_learning)">Tensor (machine learning)</a>.<br>

How to Build

<br>

Platforms:

Dependencies:

Step 1) Build Libmin <br> Cmake and build Libmin from <a href="https://github.com/ramakarl/libmin">here</a> <br> Libmin repo: <a href="https://github.com/ramakarl/libmin">https://github.com/ramakarl/libmin</a><br> The binary (build) path should be outside of the \libmin repo folder as follows.<br> Windows: <br> 1.1) cmake CMakeLists.txt -B..\build\libmin {options}<br> 1.2) Open and compile the generated \build\libmin\libmin.sln in Visual Studio 2019+<br> Linux: <br> 1.1) cmake CMakeLists.txt -B../build/libmin {options}<br> 1.2) make ../build/libmin<br> By default, you should not need to specify any additional options for just_math samples.<br> Options (multiple may be specified):<br> -DBUILD_OPENGL=true/false - for interactive apps, required for just_math (default=true)<br> -DBUILD_GLEW=true/false - for interactive apps, required for just_math (default=true)<br> -DBUILD_CUDA=true/false - for GPU-based apps (default=false)<Br> -DBUILD_OPENSSL=true/false - for secure network apps (default=false)<br> -DBUILD_BCRYPT=true/false - for secure network apps (default=false)<br> -DUSE_NVTX - for Nvidia Nsight timeline-based profiling, cpu & gpu (default=false)<br> -DUSE_PROFILE_NET - profile network code (default=false)<br><br>

You must successfully build libmin before proceeding to step 2.<br>

Step 2) Build sample<br> Cmake and build a sample.<br> The binary (build) path should be outside of the source \just_math folder as follows (-B option).<br> Windows: <br> 2.1) cmake -S \just_math\{sample_name} -B \build\{sample_name} -DLIBMIN_PATH=\build\libmin<br> 2.2) Open and compile the generated \build{sample_folder}{sample_name}.sln in Visual Studio 2019+<br> Linux: <br> 2.1) cmake -S \just_math\{sample_name} -B \build\{sample_name} -DLIBMIN_PATH=/build/libmin<br> 2.2) make \build\{sample_name}<br> All samples are apps that make use of libmin.<br> Provide the Libmin location:<br>

Contributions

I am interested in building a community around simple, well documented, math codes, in pure C/C++ for CPU (no shaders), with interactive graphical demos (not just youtube videos) that are MIT/BSD Licensed. If you have similar interests contact me at: Rama Hoetzlein, ramahoetzlein@gmail.com

License

MIT License <br> Copyright 2007-2023 (c) Quanta Sciences, Rama Hoetzlein, ramakarl.com<br> The Just Math samples are MIT Licensed.<br> Libmin is MIT Licensed with contributions from other BSD and MIT licensed sources.<br> Contact: Rama Hoetzlein at ramahoetzlein@gmail.com