equation_plotter

Crates.ioequation_plotter
lib.rsequation_plotter
version0.1.6
sourcesrc
created_at2024-11-13 11:44:40.752598
updated_at2024-11-21 02:27:55.200989
descriptionA Rust program to plot mathematical equations and save as PNG files.
homepage
repository
max_upload_size
id1446430
size130,785
Ben Santora (bensatlantik)

documentation

README

Equation Plotter

A Rust program to plot mathematical equations and save them as PNG files.

Features

  • Plot Mathematical Equations: Generate and save plots of mathematical equations.
  • Flexible and Extendable: Easily modify the code to plot different equations.
  • High-Quality PNG Output: Save the plots as high-resolution PNG images.

Prerequisites

Before running the equation_plotter, ensure you have the following installed:

On Debian/Ubuntu:

sudo apt update
sudo apt install pkg-config libfontconfig1-dev

Installation

Clone the repository:

git clone https://github.com/bensatlantik/Rust_Binaries.git
cd Rust_Binaries/equation_plotter

Build the Project

cargo build --release

Run the Program

cargo Run

Usage

You can modify the main.rs file to plot different equations by changing the closure passed to the plot_equation function.

Example: To plot the equation y = 3x + 5, update main.rs as follows:

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let linear = |x: f64| 3.0 * x + 5.0;
    plot_equation(linear, "linear.png")
}

License

This project is licensed under the MIT License.

Author

bensatlantik

Commit count: 0

cargo fmt