An open API service indexing awesome lists of open source software.

https://github.com/majormilk/magnetic-field-simulation---visualization

uses p5js to calculate the magnetic field around a dipole magnet and visualize the field.
https://github.com/majormilk/magnetic-field-simulation---visualization

dipole magnet magnetism p5js processing visualization

Last synced: 2 months ago
JSON representation

uses p5js to calculate the magnetic field around a dipole magnet and visualize the field.

Awesome Lists containing this project

README

          

# Magnetic Field Simulation / Visualization
uses p5js to calculate the magnetic field around a dipole magnet.
![firefox_sCWLgwOOcZ](https://github.com/MajorMilk/Magnetic-Field-Simulation---Visualization/assets/115612092/1762a8fa-b8e0-4817-9517-08e55f527a03)

Pretty simple, uses this equation

B=(μ0/4π)(m×r^/​​∣r∣^3)

where:

μ0​ is the permeability of free space.

m is the magnetic moment of the dipole, given by the product of the pole strength (m) and the distance between the poles (d): m=m⋅d.

r^ is the unit vector pointing from the location of the magnetic dipole to the point in space where the magnetic field is being calculated.

∣r∣ is the distance from the magnetic dipole to the point in space.