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.
- Host: GitHub
- URL: https://github.com/majormilk/magnetic-field-simulation---visualization
- Owner: MajorMilk
- License: mit
- Created: 2023-12-04T19:59:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T20:05:12.000Z (almost 2 years ago)
- Last Synced: 2025-03-13T06:16:46.574Z (7 months ago)
- Topics: dipole, magnet, magnetism, p5js, processing, visualization
- Language: JavaScript
- Homepage:
- Size: 770 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magnetic Field Simulation / Visualization
uses p5js to calculate the magnetic field around a dipole magnet.
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.