Skip to content

A group of 3D stimulation programs that can be run in terminal

Notifications You must be signed in to change notification settings

haleelsada/terminator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

terminator

A group of cool 3D stimulation programs that can be run in terminal created by first stimulating 3d shapes in space and then projecting them on the terminal screen.

Contents

Introduction

This repository contains the following 3D animations: most of them are just tweaking the original work.

  • Spinning Donut in python
  • Spinning Donut in C (By Andy Sloane )
  • Spinning Cube in C (By Servet Gulnaroglu)
  • Spinning hollow cube in C
  • Spinning cube illusion in C
  • Spinning cube with illumination
  • Spinning Tetrahedron in C
  • Static sphere in moving light

Each program is designed to run in the terminal, providing a simple yet captivating visual experience.

Prerequisites

To compile and run these programs, you will need:

  • A C compiler (e.g., gcc installed default in most linux distros)
  • A terminal emulator that supports ASCII output

Usage

To run the programs, two ways:

  1. Clone this repository:

    git clone https:/haleel/terminator.git
    cd terminator
    // If C file
    gcc name-of-the-file-wanted-to-run.c -lm
    ./a.out
    // If python
    python3 name-of-file.py

    eg:

     // If C file
     gcc cube.c -lm
     ./a.out
     // If python
     python3 donut.py
    
  2. Copy the file wanted to run from this repo and paste it to a new file created in local system:

    // If C file
    gcc name-of-the-file-wanted-to-run.c -lm
    ./a.out
    // If python
    python3 name-of-file.py

    eg:

     // If C file
     gcc cube.c -lm
     ./a.out
     // If python
     python3 donut.py
    

Examples

Spinning Donut

In python

donut_py

In C

donut_c

Spinning Cube

Spinning Cube

Spinning Hollow Cube

cube_hollow_

Spinning Cube Illusion

cube_illusion_

Spinning Cube with illumination

Here unlike the cases before the cube's shade changes as it spin. In previous cases each side has predefined color, but here it is assumed that there is a light behind the viewer to the right, hence that face will look illuminated based on the angle it makes with the spinning faces.

cube_illumination

Spinning Tetrahedron

tetrahedron_

Sphere with spinning light

sphere_

Contributing

Contributions are welcome! If you have an idea for a new 3D shape or an improvement to an existing one, please feel free to fork this repository and submit a pull request.

License

This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. You are free to use the code for personal purposes, but you are not allowed to distribute or commercialize it.

Read the full license here.

About

A group of 3D stimulation programs that can be run in terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published