Skip to content

MangyCat/FracSH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

FracSH - Terminal Fractal Explorer and Renderer

FracSH is a fast, rabbit hole of a fractal explorer. It has built in Mandelbrot, Julia, Multibrot, Burning Ship, custom formulas, colored ASCII (or unicode.), BMP export (implemented by me!), and more—all in Python!

Check out demo here! Youtube

Features

  • Real-time terminal fractal rendering (Mandelbrot, Julia, Multibrot, Burning Ship, ...)
  • Custom formula support (enter your own mandelbrot formulas.)
  • Colored ASCII mode (for nostalgia!)
  • Julia mode for any formula (experimental, 50/50 chance of working.)
  • Multithreaded rendering for fast previews and BMP export (fully working, very fast for python standards.)
  • Progress bars for both preview and BMP rendering (mandelbrot-8 so slow, the preview has a progress bar 🥀)
  • Parameter import/export (go back to your fav location)
  • Resolution prompt for BMP export (customized resolutions such as user defined resolutions, common is 1024x600 for being fast to render and clarity.)
  • Multiple color palettes and coloring modes (CGA Included!)
  • Keyboard controls for zoom, pan, palette, fractal, and more (Down below!)

Screenshots

image

image

image

image image

Usage

  1. Run the program:

    python main.py
    
  2. Controls:

    • Arrows / WASD: Pan (You can even scroll with a mouse to go up and down instead of W and S)
      • / -: Zoom in/out
    • P: Next palette
    • F: Next fractal
    • O: Next coloring mode
    • H: Home/reset view
    • B: Export BMP (with resolution prompt)
    • C: Enter custom formula
    • J: Toggle Julia mode
    • U: Toggle ASCII mode
    • Z: Export parameters
    • Y: Import parameters
    • Q: Quit (or CTRL-C :3)
  3. Custom formulas: (im not a mathematician so i don't know much about creating my own custom formulas, but there you go! works.) When prompted, enter two comma-separated expressions for the real and imaginary parts, for example an mandelbrot set looks like this:

    zx*zx-zy*zy+cx,2*zx*zy+cy
    
  4. BMP Export:
    Press B, enter your wanted resolution (e.g. 1920x1080, 512x512), and wait for the progress bar to finish. (actually works!)

Requirements

  • Python 3.13.5 (only tested on latest version, older might work without issues.)
  • blessed (pip install blessed)

Platform Compatibility

Platform Supported Notes
Windows 11 Fully tested
Python 3.13.5 Recommended version
Raspbian Fully tested, Python 3.11

License

MIT License

Portions of this code were adapted from Stack Overflow posts and Wikipedia pseudocode.

See LICENSE for details.


Time spent: 5 hours programming, 7+5 hours researching.

Achknowledgements

  • Wikipedia
  • Very inspired and motivated by Golova.dev
  • Made for TerminalCraft as LemonGravy
  • Blessed library, without it, the project would be bad due to none of the other frameworks fitting my bill.

About

Fractal renderer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages