Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rkstudio585/ascii-illusions
This project features colorful ASCII animations created with the ncurses library in C, showcasing various illusions like spinning lines, falling characters, expanding circles, and zig-zag patterns, providing an engaging visual experience in the terminal.
https://github.com/rkstudio585/ascii-illusions
7 ascii-illusion c c-programing c-script cpp illusion illusion-in-c project rk rkstudio
Last synced: about 6 hours ago
JSON representation
This project features colorful ASCII animations created with the ncurses library in C, showcasing various illusions like spinning lines, falling characters, expanding circles, and zig-zag patterns, providing an engaging visual experience in the terminal.
- Host: GitHub
- URL: https://github.com/rkstudio585/ascii-illusions
- Owner: rkstudio585
- Created: 2024-10-16T13:26:05.000Z (22 days ago)
- Default Branch: main
- Last Pushed: 2024-10-16T13:37:25.000Z (22 days ago)
- Last Synced: 2024-10-18T11:35:09.362Z (20 days ago)
- Topics: 7, ascii-illusion, c, c-programing, c-script, cpp, illusion, illusion-in-c, project, rk, rkstudio
- Language: C
- Homepage: https://rkstudio.com
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ASCII Illusions using ncurses
![svg](logo.svg)
This project consists of several ASCII animations created using the `ncurses` library in C. Each program creates a unique visual illusion in the terminal, utilizing various patterns, movements, and color effects. The illusions include spinning lines, falling characters (Matrix code rain), expanding circles, and zig-zag patterns.## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Illusion Descriptions](#illusion-descriptions)
- [Contributing](#contributing)## Features
- **Colorful animations**: Each illusion incorporates vibrant colors using the `ncurses` library's color functionality.
- **Unique visual effects**: Four different types of illusions provide varied visual experiences in the terminal.
- **Customizable delay**: The animation speed can be easily adjusted.## Requirements
- C compiler (GCC recommended)
- `ncurses` library installed on your system### Installing ncurses on Ubuntu/Linux
```bash
sudo apt-get install libncurses5-dev libncursesw5-dev
```
Installing ncurses on macOS
```
brew install ncurses
```
Installation1. Clone the repository:
```
git clone https://github.com/rkstudio585/ASCII-Illusions.git
cd ASCII-Illusions
```2. Compile each illusion program using GCC:
```
gcc -o spinning_lines spinning_lines.c -lncurses -lm
gcc -o matrix_rain matrix_rain.c -lncurses -lm
gcc -o expanding_circles expanding_circles.c -lncurses -lm
gcc -o zigzag zigzag.c -lncurses -lm
```Usage
Run each illusion program from the terminal:
```
./spinning_lines
./matrix_rain
./expanding_circles
./zigzag
```
Press Ctrl + C to exit any of the animations.Illusion Descriptions
1. Spinning Lines
Description: This illusion features lines radiating from the center of the screen, rotating in a circular motion. The colors of the lines change over time, creating a dynamic effect.
Mechanism: It uses trigonometric functions (sine and cosine) to calculate the line positions based on an angle that increments over time.
2. Matrix Code Rain
Description: Inspired by the Matrix movie, this illusion simulates falling characters that randomly appear across the screen. The characters are ASCII symbols, creating a visually striking effect.
Mechanism: Random ASCII characters are printed in a loop with a specified probability, using the rand() function to control their appearance.
3. Expanding Circles
Description: This program generates circles that expand outward from the center of the screen. As the circles grow, their colors cycle through a range of available colors.
Mechanism: The radius of the circles increases incrementally, and points along the circumference are calculated using trigonometric functions.
4. Zig-Zag Illusion
Description: This animation creates a zig-zag pattern that shifts horizontally across the screen. The pattern changes color with each frame, producing a lively effect.
Mechanism: The zig-zag pattern is determined by modular arithmetic, and it moves across the screen by incrementing an offset value.
Contributing
Contributions to enhance this project are welcome! If you have ideas for new illusions or improvements, please feel free to submit a pull request.
---