Skip to content
This repository was archived by the owner on Aug 8, 2026. It is now read-only.
FlawlessHexagonPublic archive

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetration Fractal Generator

A high-performance, real-time interactive generator for Tetration (Power Tower) fractals. This project utilizes the Taichi compiler for GPU parallelization and PySide6 to provide a smooth, interactive desktop GUI.

Features

  • Real-time Interaction: Pan and zoom smoothly through complex tetration fractals at 60 FPS.
  • Parallelization: Computations are written in Python but compiled down to GPU shaders via taichi (supporting CUDA, Vulkan, Metal).
  • Continuous Color Mapping: Smooth color mapping using cosine gradients based on pixel escape times.
  • High-Resolution Export: Save ultra-high-resolution snapshots (4K, 8K).
  • Animation Export: Render a sequence of high-resolution frames for zoom-in videos.

Technology Stack

  • Python 3.11+
  • Taichi (GPU computation kernel)
  • PySide6 (Qt Desktop UI framework)
  • NumPy & Pillow (Image processing & export)

Setup & Installation

Note: Due to the underlying dependency on pre-compiled wheels, Taichi requires Python 3.11 or 3.12. Python 3.14 is currently unsupported. If your system runs 3.14, you must use a virtual environment with Python 3.11.

  1. Clone the repository:

    git clone https://github.com/FlawlessHexagon/Tetration.git
    cd Tetration
  2. Set up a Python 3.11 virtual environment:

    python3.11 -m venv venv_311
    source venv_311/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the application:

    python main.py

Architecture & How it Works

A Tetration Fractal is generated by taking a complex number c and raising it to its own power infinitely.

Because the loop relies heavily on logarithms and exponentials, it is significantly more computationally expensive than the traditional Mandelbrot set.

To achieve real-time interactivity, this project uses the taichi JIT compiler. The core computation loop is optimized to calculate loop invariants outside the iteration loop, granting a significant performance boost.

Reference Implementations

The Reference/ folder contains the original, pure-Python unoptimized scripts created before the Taichi port. These serve as a ground truth for testing the mathematical correctness of the GPU shaders.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages