Mathematical Formula Plotter Tutorial

Mathematical Formula Plotter Tutorial

Created by K0NxT3D

Welcome to the Mathematical Formula Plotter Tutorial, where we will guide you through the process of creating a simple yet powerful visualizer using Python. This tool will help you visualize electromagnetic fields using a Rodin Coil design and generate detailed graphical outputs, making it a perfect learning project for beginner to intermediate Python Developers.

Key Features:

  • Python tkinter for building the graphical user interface (GUI)
  • numpy for numerical computations
  • matplotlib for plotting electromagnetic fields
  • Pillow for basic aesthetics and visual enhancement

Mathematical Formula Plotter Tutorial
Project Overview

This tutorial focuses on creating an interactive application that generates Electromagnetic Field visualizations based on a Rodin Coil design. The plotter demonstrates the relationship between key formulas such as magnetic field strength, inductance, and resonance frequency.

You will see how these fundamental concepts come together in a practical way, helping you grasp both theoretical and computational aspects of electromagnetism.


Getting Started

The GUI is designed to be simple and easy to configure, with just a few input fields. Once you enter values for parameters like number of turns, current, and radius, the application will generate both 2D and 3D plots.

We’ll walk you through the setup process, from installation to compiling your application, step-by-step.


Recommended Level

This tutorial is ideal for beginner to intermediate Python programmers. Some basic knowledge of Python and mathematical concepts like electromagnetic fields will be helpful, but it is not required.


Rodin Coils Explained

(More About Rodin Coils Here…)
A Rodin Coil is a type of electromagnetic coil that creates a unique toroidal magnetic field. This is useful in various applications like energy generation, wireless power transfer, and electromagnetic therapy. In this tutorial, we simulate the magnetic field and other properties of a Rodin Coil using mathematical formulas and Python programming.


Files Included

The project contains the following files:

Main Directory (/):

  • mfp (Executable): The compiled version of the application.
  • mfp.py (Python Source File): The main Python script with the core functionality.
  • README (This File): Documentation for setting up and using the project.
  • requirements.txt (Python Dependencies File): The list of required Python libraries for the project.

Backgrounds (/backgrounds):

  • background.png: A background image that should be in the same directory as the executable.

Python Requirements (requirements.txt)

To run the project, you will need to install the following Python libraries:

contourpy==1.1.1
cycler==0.12.1
fonttools==4.55.3
importlib-resources==6.4.5
kiwisolver==1.4.7
matplotlib==3.7.5
numpy==1.24.4
packaging==24.2
pillow==10.4.0
pyparsing==3.1.4
python-dateutil==2.9.0.post0
six==1.17.0
zipp==3.20.2

To install these dependencies, run the following command:

pip install -r requirements.txt

Compiling Your Application Using PyInstaller

Once you’ve set up the environment, you can compile the application into a standalone executable. Follow these steps:

  1. Create a virtual environment: python3 -m venv venv
  2. Activate the virtual environment: source venv/bin/activate
  3. Install required dependencies: pip install -r requirements.txt
  4. Compile the application using PyInstaller: pyinstaller --onefile mfp.py

Note: You’ll need to install PyInstaller if you don’t have it already:
pip install pyinstaller

Known Issues and Notes

  • matplotlib might take a little longer to load on the first run due to its initialization process.
    Please be patient.

Download:

mathematical_formula_plotter_tutorial.zip


Once the compilation is complete, you’ll have a fully functional Mathematical Formula Plotter application that you can run on any compatible system.


That’s all folks!

This tutorial offers a straightforward approach to creating a powerful visualization tool for electromagnetism.
By leveraging Python, matplotlib, and numpy, you can simulate complex fields and explore various scientific concepts interactively.

Thanks for following along, and we hope this guide helps you build a deeper understanding of mathematical visualizations!
K0NxT3D

"It’s never too late to be who you might have been."
George Eliot