Skip to main content

termigrad

A terminal-based ascii visualiser for the Gray Scott Reaction-Diffusion model.

Installation

pip install termigrad
termigrad -h

Features

  • Simplistic, readable, highly extensible codebase
  • Minimalist, colour ascii graphics
  • Highly customisable parameters for the Gray Scott model

Usage

Run with no arguments to start the stripes preset. Press Ctrl-C to stop.

termigrad

Options

Flag Description
--preset NAME Preset parameters to start with! Accepts any of coral, mooncake, spots, stripes, worms. Defaults to stripes.
--feed F Override the preset feed rate with custom input.
--kill K Override the preset kill rate with custom kill.
--speed X Speed multiplier, intuitively 0.5 for half speed, 2 for double, 0 for unlimited. Defaults to 1.0.
--no-colour Render in plain ASCII, without colour :<.
--version Print the version and exit.

Presets

Each preset is a feed/kill pair for the Gray-Scott model:

Preset Feed (F) Kill (k) Pattern
spots 0.0367 0.0649 Spots, mitosis
coral 0.0545 0.0620 Coral, branching
worms 0.0300 0.0620 Worms, moving structures
stripes 0.0220 0.0510 Stripes (default)
mooncake 0.0400 0.0600 Moon cake

The diffusion rates are fixed at dU = 0.160 and dV = 0.080.

For anything outside the presets, pass your own feed and kill rates:

termigrad --preset worms --feed 0.026

Colour

Output uses 24-bit colour where the terminal supports it, and falls back to plain ASCII when stdout is not a TTY. Colour is also disabled automatically when the NO_COLOR environment variable is set, or with --no-colour.

Requirements

Python 3.9 or newer, and numpy. Needs a terminal of at least 60x24 (I mean it should work no matter, but to see anything interesting requires a decently large terminal).

Metadata

Release files for termigrad 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for termigrad 0.3.0
File Size Uploaded
termigrad-0.3.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for termigrad 0.3.0
File Interpreter ABI Platform
termigrad-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.6 kB

Release files / termigrad-0.3.0.tar.gz

Download URL termigrad-0.3.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d7255fc6658e6ee14c761d7997d6982e503207ca2058014e9bd240e3f7be73fc
BLAKE2b-256 checksum
How to use checksums
4815108b7bc7f93af6961516da927bf51147580043dc513f1ae049bc8ad74413
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / termigrad-0.3.0-py3-none-any.whl

Download URL termigrad-0.3.0-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
099f5d5c9ce268226d4f779e6386737a720f028d8dbb3d071a827ddf699b2250
BLAKE2b-256 checksum
How to use checksums
628ae66121ccffeb76eea58820e1700e1f511589ba5d13da810a98073ccf41eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page