#plot #rust #lorenz

bin+lib lorenz-cli

Plots lorenz attractor in terminal

1 unstable release

Uses new Rust 2024

new 0.1.0 Mar 30, 2025

#142 in Visualization

MIT/Apache

7KB
141 lines

Lorenz Attractor Terminal Plotter

This project visualizes the Lorenz Attractor in the terminal using Ratatui. The attractor is dynamically plotted in real-time, allowing users to choose different projection axes.

Features

  • Real-time plotting of the Lorenz Attractor
  • Supports different 2D projections (XY, XZ, YZ)
  • Dynamically adjusts the graph bounds
  • Animated rendering using terminal graphics
  • Exit the visualization anytime by pressing 'q' or Esc

Installation

1. Install Rust (if not already installed)

Ensure you have Rust installed. If not, install it using:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then restart your terminal and verify the installation:

rustc --version
cargo --version

2. Installing from Crates.io

You can install crate directly too from:

cargo install lorenz-cli

Run it:

lorenz-cli xz

Example Output

image

(Rendered using Braille characters in Ratatui)

Development

1. Install Rust (if not already installed)

Ensure you have Rust installed. If not, install it using:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then restart your terminal and verify the installation:

rustc --version
cargo --version

2. Clone the Repository

git clone https://github.com/dhruvkjain/lorenz-cli.git
cd lorenz-cli

3. Build the Project

cargo build --release

4. Run the Lorenz Attractor

To run with the default projection (XY):

cargo run --release

Or specify an axis:

cargo run --release -- xz  # Options: xy, xz, yz

License

This project is licensed under the MIT License.

Author

Dhruv Jain

Dependencies

~7–17MB
~228K SLoC