Skip to content

MMOSHII/Berzier-Maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bezier-Maker

Bezier-Maker is a Python application that converts raster images into Bezier curve LaTeX expressions suitable for direct use in Desmos. It provides an automated way to recreate images as mathematical curve representations.

A live Streamlit demo is available here:
https://desmos-bezier-renderer.streamlit.app/


Overview

This project processes an input image, extracts curve information, and generates Bezier curve equations formatted for Desmos. The resulting output can be used to render images as parametric curves in a mathematical plotting environment.

The application is built with Python and delivered through a Streamlit interface for ease of use.


Features

  • Image-to-Bezier curve conversion
  • LaTeX output compatible with Desmos
  • Streamlit-based graphical interface
  • Local or web-based execution

Requirements

  • Python 3.10 or later
  • pip

Installation

Clone the repository:

git clone https://github.com/MMOSHII/Berzier-Maker.git
cd Berzier-Maker

Create and activate a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

Usage

Run the Streamlit application:

streamlit run app.py

Once running:

  1. Upload an image through the web interface
  2. Adjust available parameters if applicable
  3. Generate Bezier curve LaTeX expressions
  4. Paste the output directly into Desmos to visualize the curves

Output Format

The application generates Bezier curve equations formatted for use as parametric expressions in Desmos, for example:

(x(t), y(t)) = (...)

Each generated curve corresponds to a portion of the input image.


Supported Input Formats

  • PNG
  • JPG / JPEG
  • Any format supported by Pillow (PIL)

Contributing

Contributions are welcome. Please fork the repository, create a feature branch, and submit a pull request with clear descriptions of your changes.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Disclaimer

This project is experimental. Output quality depends on the complexity and resolution of the input image, as well as the limitations of curve approximation.

About

Convert an image into Bezier curve LaTeX expressions for Desmos.

Topics

Resources

License

Stars

Watchers

Forks

Languages