/donut

This project is a C implementation of the mesmerizing "donut" algorithm, based on optimization techniques outlined by Andy Sloane, and compatible with cm-console for seamless console rendering.

Primary LanguageCMIT LicenseMIT

Donut C

This project offers a C implementation of the renowned "donut" algorithm, showcasing a 3D donut shape using ASCII characters within the console. Leveraging optimization techniques detailed by Andy Sloane in his blog post "A journey to the center of the donut", it seamlessly integrates with cm-console, ensuring a captivating experience in the console environment.

Overview

The donut algorithm stands as a mesmerizing display of code, generating a spinning donut shape using ASCII characters, illustrating the profound synergy of mathematics and programming. This project endeavors to replicate this marvel in C while integrating optimizations presented by Andy Sloane.

Compatibility

Crafted to excel within console environments, this implementation harmonizes effortlessly with cm-console, a versatile console graphics library. Its compatibility extends across various terminal emulators and command-line interfaces supporting cm-console.

For further insights on cm-console, explore the Arch-Termux GitHub repository.

Compilation and Execution

To compile the project, execute the following command:

gcc donut.c -o donut -lm

To run the compiled executable, use:

./donut

Acknowledgements

  • Andy Sloane for illuminating optimization strategies for the donut algorithm.
  • The contributors to cm-console for crafting a dynamic console graphics library.