1.7 KiB
Executable File
1.7 KiB
Executable File
Description
Puts a spinning ASCII torus (mathematical name for a doughnut-shaped object) on the terminal. Original post by Andy Sloane can be found here.
How to run
- Clone or download and extract the repository
- Open a terminal inside the project directory
- Follow the steps for your Operating System
For Windows
Prerequisites for Windows
How to run the Python version
- Type
python torus.pyin the shell to run the Python version
How to build and run the C version
- Type
gcc -o torus torus.c -lmin the shell to compile using GCC - Type
clang -o torus torus.c -lmin the shell to compile using Clang - Type
.\torusin the shell to run the program
For Linux
Prerequisites for Debian based distributions
sudo apt install python3 gccto install the required compilers
Prerequisites for Arch based distributions
sudo pacman -S python3 gccto install the required compilers
How to compile and run C version
gcc -o torus torus.c -lmto compile the C version./torusto run the C version
How to run the Python version
python3 torus.pyin the shell to run the Python version
Updates to the C version
- Added support for dynamic resolution based on current terminal size
- Added Windows support
- Added support for on-the-fly dynamic resolution
- Added help option to the program
