Skip to content

Commit a99b14b

Browse files
committed
docs: add project README
1 parent 70c2b27 commit a99b14b

5 files changed

Lines changed: 111 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# MathPlotter++
2+
3+
![C++20](https://img.shields.io/badge/C%2B%2B-20-00599C?logo=cplusplus)
4+
![CMake](https://img.shields.io/badge/CMake-3.22%2B-D22128?logo=cmake)
5+
![Linux](https://img.shields.io/badge/platform-Linux-FCC624?logo=linux&logoColor=black)
6+
![CI](https://github.com/bilyayeva/math-plotter/actions/workflows/ci.yml/badge.svg)
7+
![License](https://img.shields.io/badge/license-MIT-3DA639)
8+
9+
Math Plotter++ is an application for plotting mathematical functions, built
10+
with C++20, [SFML](https://github.com/SFML/SFML) for graphics, [muParser](https://github.com/beltoforion/muparser) for parsing mathematical expressions,
11+
and [Dear ImGui](https://github.com/ocornut/imgui) for the user interface.
12+
13+
## Features
14+
15+
### Multiple Functions
16+
17+
Plot up to 15 mathematical functions simultaneously.
18+
19+
![Functions](assets/media/functions.png)
20+
21+
### Themes
22+
23+
Switch between three color themes.
24+
25+
![Themes](assets/media/themes.gif)
26+
27+
### Navigation
28+
29+
Pan and zoom using the mouse while the coordinate grid dynamically adapts
30+
to the current zoom level.
31+
32+
![Zoom](assets/media/zoom.gif)
33+
34+
### Function Customization
35+
36+
Change function colors and get immediate feedback for invalid expressions.
37+
38+
![Customization](assets/media/customization.gif)
39+
40+
## Architecture
41+
42+
Math Plotter++ is split into separate components, each responsible for a
43+
specific part of the application. The `Application` class manages the main
44+
application lifecycle and connects these components together.
45+
46+
- `Application`: manages the application lifecycle and coordinates components.
47+
- `CameraController`: handles graph navigation, zooming, and the viewport.
48+
- `GridRenderer`: renders the coordinate grid, axes, and labels.
49+
- `FunctionRenderer`: parses and renders mathematical functions.
50+
- `UserInterface`: manages the ImGui-based user interface.
51+
- `Theme`: manages application color themes.
52+
- `ColorPalette`: defines the colors used by the themes.
53+
54+
## Build and Run
55+
56+
Math Plotter++ currently targets Linux.
57+
58+
### Requirements
59+
60+
- C++20 compatible compiler
61+
- CMake 3.22 or newer
62+
- Git
63+
64+
On Ubuntu and other Debian-based distributions, install the required tools
65+
and SFML system dependencies:
66+
67+
```bash
68+
sudo apt update
69+
70+
sudo apt install \
71+
build-essential \
72+
cmake \
73+
git \
74+
libx11-dev \
75+
libxrandr-dev \
76+
libxcursor-dev \
77+
libxi-dev \
78+
libudev-dev \
79+
libfreetype-dev \
80+
libgl1-mesa-dev \
81+
libegl1-mesa-dev
82+
```
83+
84+
### Build
85+
86+
Clone the repository:
87+
88+
```bash
89+
git clone https://github.com/<username>/math-plotter.git
90+
cd math-plotter
91+
```
92+
93+
Configure and build the project:
94+
95+
```bash
96+
cmake -S . -B build
97+
cmake --build build
98+
```
99+
100+
CMake automatically downloads and builds SFML, Dear ImGui, ImGui-SFML,
101+
and muParser.
102+
103+
### Run
104+
105+
```bash
106+
./build/mathplotter
107+
```
108+
109+
## License
110+
111+
This project is licensed under the terms of the [MIT License](LICENSE).

‎assets/media/customization.gif‎

751 KB
Loading

‎assets/media/functions.png‎

33.9 KB
Loading

‎assets/media/themes.gif‎

463 KB
Loading

‎assets/media/zoom.gif‎

3.13 MB
Loading

0 commit comments

Comments
 (0)