{"id":23873907,"url":"https://github.com/jdeokkim/ferox","last_synced_at":"2025-04-13T07:48:18.481Z","repository":{"id":40298969,"uuid":"380978786","full_name":"jdeokkim/ferox","owner":"jdeokkim","description":"A lightweight 2D physics engine written in C, for educational purposes.","archived":false,"fork":false,"pushed_at":"2025-03-08T05:09:46.000Z","size":10041,"stargazers_count":233,"open_issues_count":2,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-13T07:48:04.407Z","etag":null,"topics":["2d-physics","2d-physics-engine","c","c99","emscripten","ferox","game-development","gamedev","gnu99","physics","physics-2d","physics-engine","physics-simulation","raylib","raylib-examples","sokol","stb","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://github.com/jdeokkim/ferox","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdeokkim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-28T09:36:42.000Z","updated_at":"2025-04-01T08:43:02.000Z","dependencies_parsed_at":"2023-10-15T13:13:41.043Z","dependency_job_id":"ffb08a9d-74ad-46d9-b8ed-bbf28234caa3","html_url":"https://github.com/jdeokkim/ferox","commit_stats":null,"previous_names":["jdeokkim/ferox","c-krit/ferox"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeokkim%2Fferox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeokkim%2Fferox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeokkim%2Fferox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdeokkim%2Fferox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdeokkim","download_url":"https://codeload.github.com/jdeokkim/ferox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681494,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-physics","2d-physics-engine","c","c99","emscripten","ferox","game-development","gamedev","gnu99","physics","physics-2d","physics-engine","physics-simulation","raylib","raylib-examples","sokol","stb","wasm","webassembly"],"created_at":"2025-01-03T17:16:39.451Z","updated_at":"2025-04-13T07:48:18.456Z","avatar_url":"https://github.com/jdeokkim.png","language":"C","readme":"\u003cdiv align=\"center\"\u003e\r\n\r\n\u003cimg src=\"docs/static/images/readme-logo.png\" alt=\"jdeokkim/ferox\"\u003e\u003cbr\u003e\r\n\r\n[![Version Badge](https://img.shields.io/github/v/release/jdeokkim/ferox?color=lightseagreen)](https://github.com/jdeokkim/ferox/releases)\r\n[![Codefactor Badge](https://www.codefactor.io/repository/github/jdeokkim/ferox/badge)](https://www.codefactor.io/repository/github/jdeokkim/ferox)\r\n[![Code Size Badge](https://img.shields.io/github/languages/code-size/jdeokkim/ferox?color=brightgreen)](https://github.com/jdeokkim/ferox)\r\n[![License Badge](https://img.shields.io/github/license/jdeokkim/ferox)](https://github.com/jdeokkim/ferox/blob/main/LICENSE)\r\n\r\nA lightweight 2D physics engine written in C, for educational purposes.\r\n\r\n[Documentation](/wiki) \u0026mdash;\r\n[Examples](./examples/src) \u0026mdash;\r\n[Prerequisites](#prerequisites)\r\n\r\n\u003c/div\u003e\r\n\r\n## Features\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n  \u003cvideo src=\"https://github.com/user-attachments/assets/b8a8da2e-283b-4208-820b-914429b51e08\" /\u003e\r\n\u003c/div\u003e\r\n\r\n\u003e *NOTE: This project was made for educational purposes (mainly for me to learn how a physics engine works), and therefore it is not recommended to use this library in production. Consider using other 2D physics engines with better performance such as [Box2D](https://github.com/erincatto/box2d) and [Chipmunk2D](https://github.com/slembcke/Chipmunk2D).*\r\n\r\n- Broad-phase collision detection with spatial hashing algorithm\r\n- Narrow-phase collision detection with SAT (Separating Axis Theorem)\r\n- Numerical integration with semi-implicit Euler method\r\n- Projected Gauss-Seidel iterative constraint solver\r\n- Persistent contacts (contact cache) with warm starting\r\n- Point-in-Convex-Hull, proximity and raycast queries\r\n- Support for basic collision event callbacks\r\n- WebAssembly examples powered by [raylib](https://github.com/raysan5/raylib)\r\n\r\n## Prerequisites\r\n\r\n- GCC version 6.4.0+\r\n- Git version 2.14.0+\r\n- GNU Make version 4.1+ (or BSD Make 20181221+)\r\n\r\n### Optional\r\n\r\nMake sure you have installed [raylib 4.5.0+](https://github.com/raysan5/raylib/releases/tag/4.5.0) to build all examples.\r\n\r\n## Building\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eCompiling for Windows\u003c/summary\u003e\r\n\r\n### [MSYS2 (MinGW-w64)](https://www.msys2.org/)\r\n\r\nDownload the latest release of MSYS2 from [here](https://www.msys2.org/) and follow the instructions on the homepage.\r\n\r\n```console\r\n# MSYS2, UCRT 64-bit\r\n\r\n$ pacman -Syu \u0026\u0026 pacman -S mingw-w64-ucrt-x86_64-gcc\r\n$ git clone https://github.com/jdeokkim/ferox \u0026\u0026 cd ferox\r\n$ make\r\n```\r\n\r\nThen you can install raylib by downloading the `mingw-w64-x86_64-raylib` package:\r\n\r\n```console\r\n$ pacman -S mingw-w64-x86_64-raylib\r\n$ cd examples\r\n```\r\n\r\nYou will also need to configure the `RAYLIB_INCLUDE_PATH` and `RAYLIB_LIBRARY_PATH` variables in `Makefile.mingw`:\r\n\r\n```\r\n$ vim Makefile.mingw\r\n```\r\n\r\n```\r\n# TODO: Edit these values to match your raylib installation path!\r\nRAYLIB_INCLUDE_PATH ?= /mingw64/include \r\nRAYLIB_LIBRARY_PATH ?= /mingw64/lib\r\n```\r\n\r\nFinally, in order to compile the examples, do:\r\n\r\n```\r\n$ make -f Makefile.mingw\r\n```\r\n\r\n\u003cbr /\u003e\r\n\r\n### Visual Studio 2022\r\n\r\nDownload the latest release of this library from [here](https://github.com/jdeokkim/ferox/releases) and extract the `.zip` file to your working directory. Then, start [Windows PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell?view=powershell-7.3) and type the following command to start the [Developer PowerShell](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022):\r\n\r\n```console\r\nPS C:\\Users\\jdeokkim\u003e \u0026 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\Launch-VsDevShell.ps1' -Arch amd64\r\n\r\n**********************************************************************\r\n** Visual Studio 2022 Developer PowerShell v17.7.4\r\n** Copyright (c) 2022 Microsoft Corporation\r\n**********************************************************************\r\n\r\nPS C:\\Users\\jdeokkim\\source\\repos\u003e ls ferox\r\n\r\n\r\n    디렉터리: C:\\Users\\jdeokkim\\source\\repos\\ferox\r\n\r\n\r\nMode                 LastWriteTime         Length Name\r\n----                 -------------         ------ ----\r\nd-----      2023-09-13   오후 9:15                .github\r\nd-----      2023-09-13   오후 9:15                docs\r\nd-----      2023-09-13   오후 9:15                examples\r\nd-----      2023-09-13   오후 9:15                include\r\nd-----      2023-09-13   오후 9:15                src\r\n-a----      2023-09-13   오후 9:15           2599 .clang-format\r\n-a----      2023-09-13   오후 9:15           1323 .gitignore\r\n-a----      2023-09-13   오후 9:15            629 CREDITS.md\r\n-a----      2023-09-13   오후 9:15           1099 LICENSE\r\n-a----      2023-09-13   오후 9:15           2388 Makefile\r\n-a----      2023-09-13   오후 9:15           1497 Makefile.emcc\r\n-a----      2023-09-13   오후 9:15           1499 Makefile.mingw\r\n-a----      2023-09-13   오후 9:15           2442 NMakefile\r\n-a----      2023-09-13   오후 9:15          12944 README.md\r\n```\r\n\r\nIn order to build this library, do:\r\n\r\n```console\r\nPS C:\\Users\\jdeokkim\\source\\repos\u003e cd ferox\r\nPS C:\\Users\\jdeokkim\\source\\repos\\ferox\u003e nmake -f NMakefile\r\n```\r\n\r\n\u003cbr /\u003e\r\n\r\n### [w64devkit](https://github.com/skeeto/w64devkit)\r\n\r\nDownload the latest release of w64devkit from [here](https://github.com/skeeto/w64devkit/releases), run `w64devkit-x64-2.0.0.exe` and wait for the archive to be extracted to your working directory, and run `w64devkit/w64devkit.exe`.\r\n\r\n```console\r\n$ mkdir ~/workspace \u0026\u0026 cd ~/workspace\r\n$ wget https://github.com/jdeokkim/ferox/archive/refs/heads/main.zip \u0026\u0026 unzip main.zip\r\n$ mv ferox-main ferox \u0026\u0026 cd ferox\r\n```\r\n\r\nIn order to build this library, do:\r\n\r\n```console\r\n$ make -f Makefile.mingw\r\n```\r\n\r\nYou may need to compile raylib for Windows before compiling the examples:\r\n\r\n```console\r\n$ cd .. \u0026\u0026 wget https://github.com/raysan5/raylib/archive/refs/tags/4.5.0.zip\r\n$ unzip 4.5.0.zip \u0026\u0026 mv raylib-4.5.0 raylib\r\n$ make -C raylib/src -j`nproc`\r\n$ rm ./*.zip\r\n```\r\n\r\nFinally, in order to compile the examples, do:\r\n\r\n```console\r\n$ cd ~/workspace/ferox/examples\r\n$ make -f Makefile.mingw \\\r\n  RAYLIB_INCLUDE_PATH=../../raylib/src RAYLIB_LIBRARY_PATH=../../raylib/src\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eCompiling for GNU/Linux\u003c/summary\u003e\r\n\r\n### Arch Linux / Manjaro Linux\r\n\r\n```console\r\n$ sudo pacman -Syu \u0026\u0026 sudo pacman -S base-devel git\r\n$ git clone https://github.com/jdeokkim/ferox ~/ferox \u0026\u0026 cd ~/ferox\r\n$ make\r\n```\r\n\r\nIn order to compile the examples, do:\r\n\r\n```console\r\n$ sudo pacman -Syu \u0026\u0026 sudo pacman -S alsa-lib mesa libx11 libxrandr \\\r\n  libxi libxcursor libxinerama\r\n$ git clone https://github.com/raysan5/raylib ~/raylib \u0026\u0026 cd ~/raylib/src\r\n$ make PLATFORM=PLATFORM_DESKTOP GLFW_LINUX_ENABLE_WAYLAND=OFF \u0026\u0026 make install\r\n```\r\n\r\n```console\r\n$ cd ~/ferox/examples \u0026\u0026 make\r\n```\r\n\r\n### Debian / Ubuntu\r\n\r\n```console\r\n$ sudo apt install build-essential git\r\n$ git clone https://github.com/jdeokkim/ferox ~/ferox \u0026\u0026 cd ~/ferox\r\n$ make\r\n```\r\n\r\nIn order to compile the examples, do:\r\n\r\n```console\r\n$ sudo apt update \u0026\u0026 sudo apt install libasound2-dev libgl1-mesa-dev \\\r\n  libglu1-mesa-dev libx11-dev libxrandr-dev libxi-dev libxcursor-dev \\\r\n  libxinerama-dev libxkbcommon-dev\r\n$ git clone https://github.com/raysan5/raylib ~/raylib \u0026\u0026 cd ~/raylib/src\r\n$ make PLATFORM=PLATFORM_DESKTOP GLFW_LINUX_ENABLE_WAYLAND=OFF \u0026\u0026 make install\r\n```\r\n\r\n```console\r\n$ cd ~/ferox/examples \u0026\u0026 make\r\n```\r\n\r\n### Void Linux\r\n\r\n```console\r\n$ sudo xbps-install base-devel git\r\n$ git clone https://github.com/jdeokkim/ferox ~/ferox \u0026\u0026 cd ~/ferox\r\n$ make\r\n```\r\n\r\nIn order to compile the examples, do:\r\n\r\n```console\r\n$ sudo xbps-install -Syu \u0026\u0026 sudo xbps-install alsa-lib-devel libglvnd-devel \\\r\n  libX11-devel libXrandr-devel libXi-devel libXcursor-devel libXinerama-devel mesa\r\n$ git clone https://github.com/raysan5/raylib ~/raylib \u0026\u0026 cd ~/raylib/src\r\n$ make PLATFORM=PLATFORM_DESKTOP GLFW_LINUX_ENABLE_WAYLAND=OFF \u0026\u0026 make install\r\n```\r\n\r\n```console\r\n$ cd ~/ferox/examples \u0026\u0026 make\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eCompiling for *BSD (FreeBSD)\u003c/summary\u003e\r\n\r\n### FreeBSD\r\n\r\n```console\r\n$ sudo pkg install git\r\n$ git clone https://github.com/jdeokkim/ferox \u0026\u0026 cd ferox\r\n$ make\r\n```\r\n\r\nThen you can install raylib by downloading the `raylib` package:\r\n\r\n```\r\n$ sudo pkg install raylib\r\n```\r\n\r\nFinally, in order to compile the examples, do:\r\n\r\n```console\r\n$ cd examples\r\n$ make RAYLIB_INCLUDE_PATH=/usr/local/include RAYLIB_LIBRARY_PATH=/usr/local/lib\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eCompiling for Raspberry Pi\u003c/summary\u003e\r\n\r\n### Raspberry Pi OS (Raspbian)\r\n\r\n```console\r\n$ sudo apt install build-essential git\r\n$ git clone https://github.com/jdeokkim/ferox \u0026\u0026 cd ferox\r\n$ make\r\n```\r\n\r\nYou may need to recompile raylib for Raspberry Pi before compiling the examples:\r\n\r\n```console\r\n$ sudo apt install libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev\r\n$ git clone https://github.com/raysan5/raylib \u0026\u0026 cd raylib/src\r\n$ make -j`nproc` PLATFORM=PLATFORM_DRM\r\n```\r\n\r\nFinally, in order to compile the examples, do:\r\n\r\n```console\r\n$ cd examples\r\n$ make -f Makefile.drm\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eCompiling for the Web (LLVM-to-WebAssembly)\u003c/summary\u003e\r\n\r\n\u003cbr /\u003e\r\n\r\nCompiling for the Web requires installation of the [Emscripten SDK](https://emscripten.org/).\r\n\r\n### Debian / Ubuntu\r\n\r\n```console\r\n$ sudo apt install build-essential git\r\n$ git clone https://github.com/emscripten-core/emsdk \u0026\u0026 cd emsdk\r\n$ ./emsdk install latest\r\n$ ./emsdk activate latest\r\n$ source ./emsdk_env.sh\r\n```\r\n\r\nAfter setting up the environment variables for Emscripten SDK, do:\r\n\r\n```console\r\n$ git clone https://github.com/jdeokkim/ferox \u0026\u0026 cd ferox\r\n$ make -f Makefile.emcc\r\n```\r\n\r\nYou may need to recompile raylib for the Web before compiling the examples:\r\n\r\n```console\r\n$ git clone https://github.com/raysan5/raylib \u0026\u0026 cd raylib/src\r\n$ make -j`nproc` PLATFORM=PLATFORM_WEB -B\r\n```\r\n\r\nFinally, in order to compile the examples, do:\r\n\r\n```console\r\n$ cd examples\r\n$ make -f Makefile.emcc RAYLIB_PATH=../../raylib\r\n$ emrun --no_browser ./bin/basic.html\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eCross-compiling from GNU/Linux to Windows (WSL2)\u003c/summary\u003e\r\n\r\n### Debian / Ubuntu\r\n\r\n```console\r\n$ sudo apt install build-essential git mingw-w64\r\n$ git clone https://github.com/jdeokkim/ferox \u0026\u0026 cd ferox\r\n$ make -f Makefile.mingw\r\n```\r\n\r\nYou may need to recompile raylib for Windows before compiling the examples:\r\n\r\n```console\r\n$ git clone https://github.com/raysan5/raylib \u0026\u0026 cd raylib/src\r\n$ make -j`nproc` CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar OS=Windows_NT\r\n```\r\n\r\nLastly, in order to compile the examples, do:\r\n\r\n```console\r\n$ cd examples\r\n$ make -f Makefile.mingw RAYLIB_INCLUDE_PATH=../../raylib RAYLIB_LIBRARY_PATH=../../raylib\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n## References\r\n\r\n### Introduction\r\n\r\n- [C. Hecker, “Behind the Screen: Physics, Part 1,” Game Developer Magazine, 1996.](https://www.chrishecker.com/Rigid_Body_Dynamics)\r\n- [C. Hecker, “Behind the Screen: Physics, Part 2,” Game Developer Magazine, 1997.](https://www.chrishecker.com/Rigid_Body_Dynamics)\r\n- [E. Catto, “How Do Physics Engines Work?” USC GamePipe Laboratory, Jan. 2019.](https://github.com/erincatto/box2d-lite/blob/master/docs/HowDoPhysicsEnginesWork.pdf)\r\n- [R. Gaul, “How to Create a Custom Physics Engine,” Envato Tuts+, Apr. 2013.](https://gamedevelopment.tutsplus.com/series/how-to-create-a-custom-physics-engine--gamedev-12715)\r\n\r\n### Collision Detection\r\n\r\n- [E. Coumans, “Collision Detection – Contact Generation and GPU Acceleration,” ACM SIGGRAPH ASIA 2010, Jul. 2010.](https://sgvr.kaist.ac.kr/~sungeui/Collision_tutorial/Erwin.pdf)\r\n- [E. J. Hastings, J. Mesit, and R. K. Guha, “Optimization of Large-Scale, Real-Time Simulations by Spatial Hashing. Proc. 2005 Summer Computer Simulation Conference, Cherry Hill, NJ, USA, Jul. 2005.](https://scholar.google.com/citations?view_op=view_citation\u0026hl=en\u0026user=u_GkP-EAAAAJ\u0026citation_for_view=u_GkP-EAAAAJ:UeHWp8X0CEIC)\r\n- [G. van den Bergen, “Physics for Game Programmers: Spatial Data Structures.” Game Developers Conference 2013, Mar. 2013.](https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/box2d/GDC13_vandenBergen_Gino_Physics_Tut.pdf)\r\n- [M. Bostock, “Sutherland–Hodgman Clipping,” observablehq.com, Aug. 2020.](https://observablehq.com/@mbostock/sutherland-hodgman-clipping)\r\n- [S. Boyd, “Convex Optimization,” Cambridge University Press, Mar. 2004, pp. 46–51.](https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf)\r\n- [T. MacDonald, “Spatial Hashing.” GameDev.net, Oct. 2009.](https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/spatial-hashing-r2697)\r\n- [W. Bittle, “Contact Points Using Clipping,” dyn4j.org, Nov. 2011.](https://dyn4j.org/2011/11/contact-points-using-clipping)\r\n- [W. Bittle, “SAT (Separating Axis Theorem),” dyn4j.org, Jan. 2010.](https://dyn4j.org/2011/11/contact-points-using-clipping)\r\n\r\n### Constraint Solvers\r\n\r\n- [E. Catto, “Fast and Simple Physics Using Sequential Impulses,” San Jose, CA. Mar. 2006.](https://box2d.org/files/ErinCatto_SequentialImpulses_GDC2006.pdf)\r\n- [E. Catto, “Iterative Dynamics with Temporal Coherence,” Crystal Dynamics, Menlo Park, CA, Jun. 2005.](https://box2d.org/files/ErinCatto_IterativeDynamics_GDC2005.pdf)\r\n- [E. Catto, “Solver2D,” box2d.org, Feb. 2024.](https://box2d.org/posts/2024/02/solver2d)\r\n- [R. Tonge, “Iterative Rigid Body Solvers,” Game Developers Conference 2013, Mar. 2013.](https://archive.org/details/GDC2013Tonge)\r\n- [M. Chou, “Game Physics: Resolution – Contact Constraints,” allenchou.net, Dec. 2013.](https://allenchou.net/2013/12/game-physics-resolution-contact-constraints)\r\n- [O. Strunk, “Stop my Constraints from Blowing Up!” Game Developers Conference 2013, Mar. 2013.](https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/box2d/Strunk_Oliver_Stop_My_Constraints_From_Blowing_Up.pdf)\r\n\r\n### Numerical Methods\r\n\r\n- [A. Witkin, and D. Baraff, “An Introduction to Physically Based Modeling: Differential Equation Basics,” ACM SIGGRAPH 1995, Aug. 1995.](http://www.cs.cmu.edu/~baraff/sigcourse/index.html)\r\n- [E. Catto, “Numerical Methods,” San Jose, CA, Mar. 2015.](https://box2d.org/files/ErinCatto_NumericalMethods_GDC2015.pdf)\r\n- [G. Fiendler, “Integration Basics,” Gaffer on Games, Jun. 2004.](https://gafferongames.com/post/integration_basics)\r\n\r\n### Raycast Queries\r\n\r\n- [G. Rees, “How do you detect where two line segments intersect?” stackoverflow.com, Feb. 2009.](https://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect/565282#565282)\r\n- [Scratchapixel, “A Minimal Ray-Tracer: Rendering Simple Shapes (Sphere, Cube, Disk, Plane, etc.),” scratchapixel.com, Nov. 2022.](https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-sphere-intersection.html)\r\n\r\n### Miscellaneous\r\n\r\n- [J. Allan, “An Extensive Benchmark of C and C++ Hash Tables,” jacksonallan.github.io, May. 2024.](https://jacksonallan.github.io/c_cpp_hash_tables_benchmark)\r\n- [S. Anderson, “Bit Twiddling Hacks,” graphics.stanford.edu, 1997.](http://graphics.stanford.edu/%7Eseander/bithacks.html)\r\n\r\n## License\r\n\r\nMIT License\r\n\r\n\u003e Copyright (c) 2021-2025 Jaedeok Kim (jdeokkim@protonmail.com)\r\n\u003e \r\n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\r\n\u003e of this software and associated documentation files (the \"Software\"), to deal\r\n\u003e in the Software without restriction, including without limitation the rights\r\n\u003e to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n\u003e copies of the Software, and to permit persons to whom the Software is\r\n\u003e furnished to do so, subject to the following conditions:\r\n\u003e \r\n\u003e The above copyright notice and this permission notice shall be included in all\r\n\u003e copies or substantial portions of the Software.\r\n\u003e \r\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n\u003e IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n\u003e FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n\u003e AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n\u003e LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n\u003e OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n\u003e SOFTWARE. \r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeokkim%2Fferox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdeokkim%2Fferox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeokkim%2Fferox/lists"}