Quick Links

Education Edu

Simulations Sims

Math Tools Math

Games Games

Generative ArtArt

Actinoscript Prog

Farmville Farm

 

 


Alkanes

Golgi Volvox

Click the above-left picture of Golgi Volvox applet to start the demo full screen.

 
 

Simulated Golgi Volvox

Idea

I saw a Flash Widgit for sale that created a microscopic sort of view clearly intended to lend an air of science to a webpage, and thought maybe I can make something like that.

Golgi Volvox Photo

Golgi Volvox (GV), not Buckminster Fuller, is the true inventor of the geodesic dome. It's also pretty cool looking thing under a microscope.

Finally, a Use for Deco Vine

Having recently entertained myself with the otherwise seemingly useless Deco Vine animation fill tool in Flash CS4, I realized I might be able to use it to fake a simulation of GV or other microscopic looking things.

I created a basic deco vine fill with all the colors set to white, broke it apart, and converted the lines to fills, resulting in something like this:

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

I circle-fied it and surrounded it with a faint white radial gradient bubble. I put 2 copies of the circlefied deco vine in the movie, the top to act as a slowly rotating mask to the other. And, Voila! Fake protist-like cell texture.

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Add a blur filter...

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

And a green glow filter...

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Enhancing The Effect

And it looks moderatly like GV. But the effect is improved when you add "baby" volvox inside it. I give it random numbers of babies and then bounce them off the inside. There is probably an appropriate method to reflect a little circle off the inside of a big circle, but I just assign random velocity until it is heading inward again. Btw, I know math, but I'm currently using the excuse that I'm operating in a darkish room with little free desk space, and no paper. If you know the correct formulas, I'll be happy to implement.

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

I wrote an actionscript 3 particle system to instantiate, rotate, grow/shrink, stretch, blur, alpha fade and all the other fun stuff and the result looks moderately like something Hollywood would pretend is on a microscope slide. Takes only 11k, but with so many things moving, it will gladly suck up every last cpu cycle you have available.

Result

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

t

Code

Here's what the frame 1 actonscript 3 looks like.

var numCells:Number = 30; var cells:Array = []; var bf:BlurFilter = new BlurFilter(); var MaxDepth:Number = 10; var gf:GlowFilter = new GlowFilter(); gf.color = 0x00FF00; gf.strength = 1; for(var it:Number=0; it < numCells; it++) { var cell:GV = new GV(); cells.push(cell); addChild(cells[it]); setupCell(it); } function setupCell(id):void { cells[id].depth = 3 + Math.random()*MaxDepth; // [3, 3+MaxDepth] bf.blurX = bf.blurY = cells[id].depth; // amt of blur related to depth cells[id].filters = [bf, gf]; // blur & glow filters cells[id].dx = 2*Math.random() + 0.25; // Vx [.25, 2.25] cells[id].dy = Math.random() - 0.5; // Vy [-.5, .5] cells[id].dd = Math.random()/2 - 0.25; // del depth [-.25, .25] cells[id].dr = Math.random()-0.5; // del rotation [-.5, .5] cells[id].bsX = 1+Math.random(); // base x scale [1, 2] cells[id].bsY = 1+Math.random(); // base y scale [1, 2] cells[id].scaleX = cells[id].bsX*cells[id].depth/50; // [3/50, (6+2MaxDepth)/50] cells[id].scaleY = cells[id].bsY*cells[id].depth/50; // [3/50, (6+2MaxDepth)/50] cells[id].y = stage.stageHeight/2; cells[id].x = -cells[id].width*(1+Math.random()); // offstage left } function updateCells(e:Event):void { for(var it:Number=0; it < numCells; it++) { cells[it].x += cells[it].dx; // x cells[it].y += cells[it].dy; // y cells[it].depth += cells[it].dd; // z bf.blurX = bf.blurY = Math.abs(cells[it].depth/5); cells[it].filters = [bf, gf]; cells[it].rotation += cells[it].dr; cells[it].alpha = 1-Math.abs(cells[it].depth/100); cells[it].scaleX = cells[it].bsX*cells[it].depth/50; cells[it].scaleY = cells[it].bsY*cells[it].depth/50; if ( cells[it].x>(cells[it].width+stage.stageWidth) || // >right (cells[it].y>stage.stageHeight+cells[it].height) || // >bottom (cells[it].y<-cells[it].height) || // 100) ) { setupCell(it); } } } addEventListener(Event.ENTER_FRAME, updateCells);

Baby-Move Code

The mama volvox has its own particle system to control the babies.

var numBabies:Number = Math.floor(1+Math.random()*3); var babies:Array = []; var mamaR:Number = 31; // parent radius, actually max baby move R var gf:GlowFilter = new GlowFilter(); gf.color = 0x00FF00; for(var bt:Number=0; bt < numBabies; bt++) { var baby:Bubble = new Bubble(); baby.scaleX = baby.scaleY = 0.1377; baby.x = Math.random()*mamaR; baby.y = Math.random()*mamaR; baby.dx = (Math.random()-0.5)/2; baby.dy = (Math.random()-0.5)/2; baby.filters = [gf]; addChild(baby); babies.push(baby); } function moveBaby(ID):void { babies[ID].x += babies[ID].dx; babies[ID].y += babies[ID].dy; if (Math.sqrt(babies[ID].x*babies[ID].x + babies[ID].y*babies[ID].y) >= mamaR) { babies[ID].x -= babies[ID].dx; babies[ID].y -= babies[ID].dy; babies[ID].dx = (Math.random()-0.5)/2; babies[ID].dy = (Math.random()-0.5)/2; } } addEventListener(Event.ENTER_FRAME, moveBabies); function moveBabies(e:Event):void { for(var bt:Number=0; bt < babies.length; bt++) { moveBaby(bt); } }