
Im still at it. You know how it goes. There are some old projects that you just keep coming back to because they show more promise than some of your other fledgling sketches. And it seems that every time I poke at the code, I find dead variables, crappy loops, and other messes that make me wonder, “Why the hell did I do THAT?”.

So back to Magnetosphere I go, some two years after its first creation. For those that dont know the story, I became enamored with magnetism after seeing ferromagnetic fluid for the first time. You know, that black oil that responds to magnetic fields (google it). I got some from the internet and was hooked. I just wanted to know why the spikes from the magnetic fields arranged themselves in the patterns I witnessed.
It started simply enough: Make a bunch of positively charged particles, drop them on a plane, and see what happens. And what happened was exactly what I should have expected. The particles pushed on each other until they pushed right off the page.
To keep them corralled, I put a negative charge in the middle of the plane and that helped to keep them in place. It pulled all the particles slowly towards its center but each particle would push its neighbors away. Here is an early sketch. Click and drag.
Then came the hardest part of this whole process. I wanted to move this into a three dimensional space. Holy crap, I had no idea what I was getting into. It was much much harder than I thought it would be since I had no understanding of vectors and moving about in a 3D space. After much back and forth with the fine minds that frequent the processing forums, I ended up with this. Again, just click and drag.
The rest is icing. I added several negative spaces instead of just having one in the center. I added ribbon trails to the particles. I made the mass and charge of the particles responsive to different frequencies of the audio input. I made a system for using colors from imported photos (tip of the hat to Drew Trujillo, whose InTheMod site provided me with many months of nice color palettes). And finally, started using timed audio triggers to control the speed and rotation of the in-applet camera.
Here are a couple example movies.
Tone Twilight Zone by Cornelius
Groove is in the Heart by Deee-Lite

Wow, it’s all that good stuff in realtime??? Can I have some info about how you recorded it (resolutions, tools, etc)?
It makes me wish to do more generative stuff, it would never be that good though
Wow, these are incredible. Will be showing these to my students tomorrow!
Really great!
I love the transitions between the different behaviors and color configurations, they are very well in sync with the music, (I’m guessing those changes manually triggered? I’m not referring to the beats)
I also like a lot the interplay between the organic feeling of the ribbons’ movement and the synthetic feeling of the circles and circle positions.
Thanks!!
Thanks all! Some responses…
Ricard: For the top video (the Cornelius one), nearly all of the transitions are automatic. I changed the color palette a few times, and pulled out the orbs one by one at the very end of the video. I probably had the audio input a bit too high for that one… ended up being a bit more frantic than I had hoped considering the audio is so soothing.
Daniel: Send me an email and I will get you a working version you can show live if youd like.
Christian: Yeah, its all in realtime. I hooked my projector up to my MacBook Pro laptop and ran the project (which was made with Processing and runs fullscreen at 50 to 60 fps. I playeds some audio off iTunes and recorded the projection with a Canon Powershot with video capabilities. Once I had the video, I brought it into Quicktime Pro, cropped off the ends, and repasted in the original audio (because the mic on my camera is crap).
Ahh, it looked too responsive. Very tricky the camera capture
The thing is that I know that with Snapz with macs you can record the screen in the RAM, having so incredibly higher performances compare recording to hd. Unfortunately I’m now aware of any similar software for Windows.
Really amazing. Great to see the process in detail, and also good to know that I’m not the only one who hangs on to projects for years and years.
Kudos.
Wow, that’s some nice stuff! I just looked at the code and I was trying to run it on eclipse (with minor tweaking here and there) but I was unsuccessful in doing that. I think it’s because I’m missing that field.gif file. Do you think you could send me that file so that I can try to run it on my end?
Very impressive work! Keep it up! : )
Eric
Eric: you can extract the image from the .jar file in the website.
One thing to note, the code from the early versions of this project is now outdated. You will need to change a few things to get it to work with the newest version of Processing. As for the field.gif file, you can just make your own. It is just a gradient ellipse, white on black.
now it’s official. you’re a fucking god
Congrats, it’s the most amazing thing i’ve seen in processing ever. And i’ve been in the scene for quite a long time. It’s so dynamic, fresh and fun
Splendid.
Oskar FIschinger would be jealous.
Millsy.
DOPe!
Impressive…. as usual !
Do get that speed in realtime, you must be running this with OpenGL (or P3D) renderer…. How do you “deal” with strokeWeight() ?
Thanks for the great comments, all. Happy to read them.
Hugues, I am using the OPENGL renderer in Processing and making tons of direct OpenGL calls. It runs fullscreen in realtime around 30 to 45 frames per second, depending on how much I am trying to do. I am also using display lists for the ellipses. I did a test that rendered 6000 random sized ellipses to the screen using just the standard ellipse() call, and then again using an OpenGL callList. The frame rate nearly quadrupled.
As for strokeWeight, I am not using it. The ribbons are quad_strips and the ellipses are actually 2 ellipses with slightly different radii, so sometimes it ends up looking like I am using think strokes. However, if you do direct OpenGL calls, you can use the gl.gl_line_width to set the stroke width. You can also do dotted lines if youd like using gl.gl_line_stipple().
Example image up at flickr (you need to view the full size version to see it).
http://www.flickr.com/photos/flight404/388924345/
absolutely fabulous. brilliant. so so def.
ok…. I jumped into the OpenGL abyss
. I found some useful samples of code, giving an idea of where to start. But I haven’t been able to draw an ellipse yet
. But I do have found some doc to start :
http://www.rush3d.com/reference/opengl-redbook-1.1/chapter02.html
http://www.rush3d.com/reference/opengl-redbook-1.1/chapter11.html
me again…
I got it with a simple cos and sin.
float x = cos(u);
float y = sin(u);
gl.glVertex2f(x, y);
but how to make the ellipse “unfilled” (ie. noFill()) ?
I make a callList for filled ellipses and stroked ellipses. The stroke one would call gl.glBegin(GL.GL_LINE_STRIP) and the filled would be gl.glBegin(GL.GL_POLYGON);
Send me an email and I will get you a source code example of how to use the callList stuff.
I want to kiss your face. I thoroughly enjoyed your experiments- I hope to see more in the future. Bookmarked!
If you could make this into an iTunes visualization plugin… or something like that… I would pay for it. Just wicked.
[...] Magnetism + Spheres = Fun!! [...]
Olá from portugal.
quite amazing stuff dude
congratz!
now, u did it all in Processing, even the beat detector thing ??
can u explain me how to do it ?
or give some clues for the code… wich i dont give a clue how to work in processing…
kind regards!
vicafonso@gmail.com
Simply beautiful creations! So fluid, love the dynamics of the last video.
Thanks!
[...] Magnetism + Spheres = Fun!! [Flight 404 blog] [...]
Soooo… how much would I have to pay you to use this in a VJ-like setup for my next gig?
Seriously though, I have been looking for something like this, since most if the time we can’t afford a VJ for the gigs we do, and if plugging in a macbook pro can do THIS in realtime, then we probably wont have to hire a VJ for a long long time
Give me a little while. My company (Barbarian Group) has some things in the works. Should be interesting!
[...] all manner of distractions Tone Twilight Zone by Cornelius made by processing [...]
Loved it as a vj and a visualizer creator. Just amazing.
Did you use midi to move the scenes forward or is it on a sequencer/timeline? Secret herbs and spices ey??
Keep up the good work.
This stuff is so incredible… like Kandinsky dancing… which I’m sure Kandinsky would’ve loved.