This is a Python Derivative plotter made with manim
What does it do?
There are two main codes here.
- useful_derivatives.py
- derivatives_simple.py
With both you can basically do the same
- Give it a simple polynomial function as a String like "2x4+3x2"
- It calculates the first and second derivatives of the function
- It plots all of them
- It shows you all their zero points
- It shows you the Extremes and Turning points of the function
The only difference between the two is, that the simple version only shows all that to you while the other one animates it look at the program outputs here
What do the results mean:
in the picture version
- blue line: main function
- blue dots: zeros of the main function
- green line: the first derivative function
- green dots: extremes of the main function (TIP=local minimum,HOP=local maxiumum,TEP=middle points with zero slope)
- red line: second derivative function
- red dots: turning points of the main function
- purple is where the main function is curved to the left
- yellow is where the main function is curved to the right
in the animation
- First it animates the main function and it's zeros in blue
- then the first derivative function and it's zeros in green
- then the second derivative function and it's zeros in red
- Afterwards it shows you the extremes in Blue (TIP=local minimum,HOP=local maxiumum,TEP=middle points with zero slope)
- And then the turns in Blue and the curvature of the function purple=left yellow=right and the turning points
How can you do it yourself
- You can simply run
pip install manim-derivative-plotter - Then you can run
python -c "from manim_derivative-plotter import render_picture; render_picture()"for an image - and
python -c "from manim_derivative-plotter import render_animation; render_animation()"for a video. - to Input your function you just type it in the command prompt
- Input style for functions: coefficientxpower+next-coefficienxnext-power...
- A few examples:
- 2x3
- x3-4x2
- 4.3x4+x
- -2.5x6-x2+3
How did I build it
I used manim to animate and sympy for the zero points, so a big thanks to Grant SAnderson from 3blue1brown. I used perplexity and a little GitHub Copilot for research especially for specific manim functions and to write a few little functionalities with syntaxes I didn't know but never more than 2-3 lines and a lot of help on the package structure. I also used it to understand the errors that were output. This is my first manim project and I'm quite happy with how it turned out and I plan to do more.
to Do (for future reference)
- maybe make interactive
- make input more user friendly
- make handle of constants better
- typst color work
- test typst install
- typst in animation
Metadata
Release files for manim-derivative-plotter 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| manim_derivative_plotter-1.0.3.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| manim_derivative_plotter-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.8 kB
Release files / manim_derivative_plotter-1.0.3.tar.gz
| Download URL | manim_derivative_plotter-1.0.3.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad94f471ce51dd8134acaa25c7d95fe3105f31fa8855ea21044b147f63efaeb0
|
|
BLAKE2b-256 checksum How to use checksums |
7cba05ce02b018daac9bc6068ffe43cee6f60e50c3b32d43124e9d9f480084d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / manim_derivative_plotter-1.0.3-py3-none-any.whl
| Download URL | manim_derivative_plotter-1.0.3-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a33662069a6a09f0e504d5246004e8ca4a36e84f387ae178732cd7a432ce1327
|
|
BLAKE2b-256 checksum How to use checksums |
443988e07dc0a1bd2675d17730123ba876b9721b17123d4e41572362d2ca5804
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|