NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 17, 2019, 12:26:56 am

"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)

 Pages: [1]   Go Down
 Author Topic: is there an easier way to draw static magnetic field lines of a bar magnet?  (Read 4470 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message on: August 08, 2012, 05:15:48 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

dear prof,

is there an easier way to draw static magnetic field lines of a bar magnet?

notice is my source codes the way i made the visible foe B=1, B=2, B=3, B=4?

i cant be doing this way for B=100 for example.

is there a way i can use array 3D trails ?
or is there a analyticCurve3D for array?

thanks!
 fieldlines.png (35.33 KB, 1366x768 - viewed 471 times.) *** There are 2 more attached files. You need to login to acces it! « Last Edit: August 08, 2012, 05:36:23 pm by lookang » Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3082

 « Embed this message Reply #1 on: August 08, 2012, 05:35:53 pm » posted from:,,Satellite Provider

I think the way I calculated the field is by using Biot-Savart law.
Calculate magnetic field sue to a coil. The solenoid is simple copy of many coils. So just need to sum up the field from one coil.
You should be able to calculate it.

The magnetic field of a bar is the same as the field of a solenoid.
 Logged
lookang
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: August 08, 2012, 05:43:33 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

i do not mean to use Biot-Savart law which is computational expensive.

i am cheating using
analyticCurve3D

x = "0.5+0.5*Math.cos(theta)*Math.cos(0)-1*Math.sin(theta)*Math.sin(0)"
y = 0
z = "0+0.5*Math.sin(theta)*Math.sin(0)-1*Math.sin(theta)*Math.cos(0)"

transform "z:270d" etc to get the many lines i need.

is there a analyticCurve3D for array? which immediately draws the lines without ODE evolution.
thanks!
 Logged
 Pages: [1]   Go Up
"That their main business was not put into the mind knowledge which was not there before, but to turn the mind's eye towards light so that it might see for itself." ...Plato's advice to educators(429-347BC)