|
1 | 1 | # SimplyGraph |
2 | 2 |
|
3 | | -#### This project is in very early development, and most features are not yet ready |
| 3 | +A simple, fast graphing calculator for Android |
| 4 | + |
| 5 | +Follows the latest Material 3 design guidelines and adapts to the system color (Material You) |
| 6 | + |
| 7 | +Supports explicit and implicit functions and relations, polar functions, and parametric relations |
| 8 | + |
| 9 | +## Screenshots |
4 | 10 |
|
5 | 11 | <p width="100%"> |
6 | | -<img src="screenshot.png" width="30%"> |
7 | | -<img src="screenshot2.png" width="30%"> |
8 | | -<img src="screenshot3.png" width="30%"> |
9 | | -</p> |
| 12 | +<img src="screenshot.png" width="24%"> |
| 13 | +<img src="screenshot2.png" width="24%"> |
| 14 | +<img src="screenshot3.png" width="24%"> |
| 15 | +<img src="screenshot4.png" width="24%"> |
| 16 | +</p> |
| 17 | + |
| 18 | +## How it works |
| 19 | + |
| 20 | +This app utilises JNI to offload the graph point calculation to native C++ for extremely fast |
| 21 | +calculation of points (at least a few orders of magnitude improvement over Kotlin code in my own |
| 22 | +benchmarks). The basic layout of how it works is: |
| 23 | + |
| 24 | +- (Steps) |
| 25 | + |
| 26 | +1. Function string input by user |
| 27 | +2. JNI function called: Function string, canvas geometry data, scale and offset are passed |
| 28 | +3. JNI performs C++ function call passing all the data |
| 29 | +4. C++ function returns std::vector<float> containing point data |
| 30 | +5. JNI returns array of floats |
| 31 | +6. Points are plotted on Jetpack Compose Canvas |
| 32 | + |
| 33 | +The exact working is slightly more complex, for example the C++ point calculation function analyses |
| 34 | +the function string to determine whether it is explicit, implicit, polar or parametric and performs |
| 35 | +the calculations accordingly, and also simplifies the graph if there are too many points to save |
| 36 | +memory and drawing time. |
| 37 | + |
| 38 | +### Special thanks |
| 39 | + |
| 40 | +- This app uses [ExprTk](https://github.com/ArashPartow/exprtk) to evaluate mathematical |
| 41 | + expressions. Thanks to Arash Partow for creating this library. |
0 commit comments