https://github.com/im-rises/cubeascii
Cube ASCII Art for the terminal with color for each faces
https://github.com/im-rises/cubeascii
3d 3d-projection ascii c color cube
Last synced: 3 months ago
JSON representation
Cube ASCII Art for the terminal with color for each faces
- Host: GitHub
- URL: https://github.com/im-rises/cubeascii
- Owner: Im-Rises
- License: mit
- Created: 2023-05-22T04:41:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T21:50:40.000Z (over 1 year ago)
- Last Synced: 2025-07-31T01:30:43.936Z (10 months ago)
- Topics: 3d, 3d-projection, ascii, c, color, cube
- Language: C
- Homepage:
- Size: 69.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CubeAscii
This is a C project to print a 3D rotating cube in the terminal using ASCII characters with each face having a different
color.
It uses ANSI escape codes to move the cursor and change the color of the text.
I used my header only library for this project, you can find
it at [cUnicodeLib](https://github.com/Im-Rises/cUnicodeLib/tree/main/cUnicodeLib) this library is used to print the
unicode characters and to change the color of the text (foreground and background).
> **Note**
> This project is based on the work from `Servet Gulnaroglu` [here](https://www.youtube.com/watch?v=p09i_hoFdd0)
## Demo
https://github.com/Im-Rises/cubeAscii/assets/59691442/f5bd5eae-67f1-4b75-88f0-6140808ba2f8
## How to use
### Build
To build the project, you need to have `CMake` installed on your computer.
Then, you can run the following commands:
```bash
mkdir build
cd build
cmake ..
cmake --build .
```
### Run
To run the project, you can run the following command:
```bash
./cubeAscii
```
### Options
You can use the following options:
- `-h` : to display the usage
- `-c ` : to set the number of cubes to display (default: 1) choose between 1 and 3
- `-g` : to display in gray mode the cubes
- `-m` : to set the max rotation speed
- `-n` : to set the min rotation speed
You can combine the commands to set the number of cubes and to display in gray mode at the same time:
```bash
./cubeAscii -c 3 -g
```
This will display 3 cubes in gray mode.
## Github-Actions
[](https://github.com/Im-Rises/CubeAscii/actions/workflows/flawfinder.yml)
[](https://github.com/Im-Rises/CubeAscii/actions/workflows/cmake.yml)
[](https://github.com/Im-Rises/CubeAscii/actions/workflows/codeql.yml)
[](https://github.com/Im-Rises/CubeAscii/actions/workflows/cpp-cmake-publish.yml)
The project is set with a set of different scripts:
- flawfinder : to check for security flaws in the code
- CMake : to build the project for Windows, macOS and Linux
- CodeQl : to check for code quality and security
- Cpp Cmake Publish : to publish the project on GitHub
## Documentations
Wikipedia:
## Contributors
Quentin MOREL :
- @Im-Rises
-
[](https://github.com/Im-Rises/CubeAscii/graphs/contributors)