Skip to main content

CLI tool to convert images to the LaTeX bezier curves formulas

Project description

Img2Desmos

This is a simple python script that converts an image to the bezier curves which can be plotted on desmos.

image

Requirements

  • Python 3.11
  • Poetry
  • [Optional] Chafa (for previewing images in terminal)

Installation

pip install img2desmos

Usage

> img2desmos --help
                                                                                             
 Usage: img2desmos [OPTIONS] IMG                                                             
                                                                                             
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────╮
│ *    img      TEXT  Path to the image to convert into graph [default: None] [required]    │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────╮
│ --output   -o      TEXT     Output formulas file path [default: None]                     │
│ --preview  -p               Preview the img in a window (chafa is required)               │
│ --upper            INTEGER  Upper threshold for the edge detection [default: 200]         │
│ --lower            INTEGER  Lower threshold for the edge detection [default: 100]         │
│ --help                      Show this message and exit.                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

Formulas will be pasted into clipboard

Demo

https://github.com/Perchinka/img2desmos/assets/34923601/b34c509b-6fae-4e57-8f8f-7d76a0139e42

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

img2desmos-1.1.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

img2desmos-1.1.0-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page