https://github.com/wojciech-graj/pytermgl
2D & 3D Rendering in the Terminal
https://github.com/wojciech-graj/pytermgl
cython graphics interaction python rendering terminal terminal-based
Last synced: 11 months ago
JSON representation
2D & 3D Rendering in the Terminal
- Host: GitHub
- URL: https://github.com/wojciech-graj/pytermgl
- Owner: wojciech-graj
- License: mit
- Created: 2022-06-18T10:00:42.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-16T22:02:59.000Z (over 1 year ago)
- Last Synced: 2025-04-25T05:51:16.637Z (about 1 year ago)
- Topics: cython, graphics, interaction, python, rendering, terminal, terminal-based
- Language: Cython
- Homepage:
- Size: 7.67 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TermGL
A terminal-based graphics library for 2D and 3D graphics.
Features:
- Windows & *NIX support
- C99 compliant without external dependencies
- Custom vertex and pixel shaders
- Affine texture mapping
- 24 bit RGB
- Indexed color mode: 16 Background colors, 16 foreground colors, bold and underline
- Non-blocking input from terminal
- Mouse tracking

## Installation
Package can be found on [PyPI](https://pypi.org/project/termgl/) and can be installed using pip:
```
pip install termgl
```
## Documentation
The best way to learn to use TermGL is to read the tutorial [here](./TUTORIAL.md).
Additionally, documentation of all public members of TermGL can be found [here](https://wojciech-graj.github.io/pyTermGL/).
## Demo
A variety of demos can be found in the `demo` directory. To run the demo utility, simply `python demo`.
Available demos and TermGL features used:
1. Utah Teapot\
Renders a rotating 3D Utah Teapot.
- Backface culling
- Z buffering
- Double-width characters
- 3D rendering
- Custom shaders
2. Color Palette\
Renders a palette of various text colors and styles.
- Colors & Modifiers
3. Mandelbrot\
Renders an infinitely zooming-in Mandelbrot set.
- Point rendering
4. Realtime Keyboard\
Displays keyboard input in realtime.
- Text rendering
- Realtime keyboard input
5. Textured Cube\
Renders a texture-mapped cube.
- Backface culling
- Z buffering
- Double-width characters
- 3D rendering
- Shaders
- Texture mapping
6. RGB\
Renders overlapping red, green, and blue circles.
- 24 bit RGB
- Text rendering
7. Mouse\
Displays mouse position and button state.
- Mouse tracking
- Text rendering
### Gallery

