Enjoy the fun of physics with simulations!

Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Title: is there an easier way to draw static magnetic field lines of a bar magnet?Post by: lookang on August 08, 2012, 05:15:48 pm
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! Title: Re: is there an easier way to draw static magnetic field lines of a bar magnet?Post by: Fu-Kwun Hwang on August 08, 2012, 05:35:53 pm
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. Title: Re: is there an easier way to draw static magnetic field lines of a bar magnet?Post by: lookang on August 08, 2012, 05:43:33 pm
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! |