There is current flow I in the z direction (along z-axis) which will produce circular magnet field.

There is another current i along x direction initially ($i<), the direction of thos current can be adjusted with slider.

The magnet force between current segment, $i d\vec{\ell}$ in magnetic field $\vec{B}=\frac{\mu_o I}{2\pi r}\hat{\theta}$ is $d\vec{F}=i d \vec{\ell}\times \vec{B}$

The direction of current is represented with red arrow. Gray arrows are magnetic field, Blue arrows are interaction force.

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/twolinesBfield_pkg/twolinesBfield.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1553.7kB):double click downloaded file to run it. (23 times by 18 users) , Download EJS source (4 times by 3 users) View EJS source