Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

I have a question for all of you. I've been wanting to make a 3D vector field that would represent a magnetic field (for fun) around some segment of wire with a constant current flowing through it. I'm assuming I have a parametric equation for the wire segment. The one equation that comes to mind is Biot-Savart's law:

[tex] \vec { B } =\frac { { \mu }_{ 0 }I }{ 4\pi } \int { \frac { d\vec { s } \times \hat { r } }{ { r }^{ 2 } } } [/tex]

In practice, I've only ever used Biot-Savart's law to calculate in 2-D, and either the wire segment has been of infinite length, or we were just calculating the electric field at one-point, and the math has been nice. I want to generate a vector field that gives the magnetic field at all points around the wire. Does anyone know how to go about doing this ? What sorts of equations/techniques lend themselves to this ? Any nice examples people can point to (URLs) ?? Thank you.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Creating a magnetic field (vector field)

**Physics Forums | Science Articles, Homework Help, Discussion**