We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Magnetic Field Lines
Page Index Toggle Pages: 1
Magnetic Field Lines (Read 1446 times)
Magnetic Field Lines
Aug 29th, 2009, 2:09pm
 
Hey, I'm trying to trace magnetic field lines between a variable number of magnetic poles. I've tried a few things with particles and while it looks cool it isn't as speedy nor as explicit as simply drawing the lines. But, I can't think of how to do it for the life of me.

Here is an applet that is able to do what I want (I can't seem to post the URL so it is a bit jumbled) : falstad.com/vector3dm/

I can't make heads or tails of it though; all I've figured out so far is that it has to do with the genLines and drawLines function. Does anyone have an idea how to do this, or can maybe make sense of that applet?
Re: Magnetic Field Lines
Reply #1 - Sep 1st, 2009, 3:34pm
 
I think what you're really looking for is the function that yields the magnetic field vector given a point in space.  If you can get a function of (x,y) that returns the magnitude and direction of the field, then it's just a matter of drawing lines.  I'd suggest searching wikipedia or any physics textbook.
Re: Magnetic Field Lines
Reply #2 - Sep 1st, 2009, 3:56pm
 
toxi just made some... they look amazing http://www.flickr.com/photos/toxi/sets/72157620899002878/
Re: Magnetic Field Lines
Reply #3 - Sep 1st, 2009, 3:57pm
 
they are probably based on some of his older sketches that are still online http://toxi.co.uk/p5/fieldlines/
Re: Magnetic Field Lines
Reply #4 - Sep 1st, 2009, 9:10pm
 
Those are *beautiful.*  I'm most attracted to the early sketch you just linked.  --Ben

PS: recompiled with OpenGL mode, for fun.  Very fast.

http://benhem.com/dev/gravityFields
Re: Magnetic Field Lines
Reply #5 - Sep 1st, 2009, 10:03pm
 
true, i really love em too
Page Index Toggle Pages: 1