CLICK HERE TO COPY
Actionscript:
[SWF(width = 600, height = 500, frameRate=30, background = 0xFFFFFF)]
var cmd:String = "1000 small orange circles, 9000 black lines,3 large white circles"
// try some of these commands:
//"300 small red triangles and 2 big orange circle 3 big black lines";
//"100 big black triangles, ten small white rectangles 1 big white circle and 1 [...]
CLICK HERE TO COPY
Actionscript:
import com.actionsnippet.qbox.*;
var sim:QuickBox2D = new QuickBox2D(this, {debug:true});
// use the box2D default renderer (debug : true)
sim.createStageWalls();
// anchor
var pre:QuickObject = sim.addCircle({x:9, y:3, radius:.5, density:0});
// create a chain of boxes
for (var i:int = 0; i<12; i++){
var curr:QuickObject = sim.addBox({x:10 + i, y:3, width:.9, height:.9, angularDamping:1});
[...]
By Zevan | April 30, 2009
CLICK HERE TO COPY
Actionscript:
[SWF(backgroundColor = 0x333333)]
import com.actionsnippet.qbox.*;
// setting debug = true, will use the Box2D debug rendering
var sim:QuickBox2D=new QuickBox2D(this, {debug:false, gravityY:10});
// creates static boxes on all sides of the screen
sim.createStageWalls({lineAlpha:0, fillColor:0xFF9900});
// add 25 boxes
for (var i:int = 0; i<25; i++){
var xp:Number = 3 + (i % 5);
var yp:Number = 1 + [...]
By Zevan | April 29, 2009
CLICK HERE TO COPY
Actionscript:
[SWF(width = 800, height = 800)]
var a:Number = 0.19;
var b:Number = .9;
var c:Number = 1.3
var xn1:Number = 5;
var yn1:Number = 0;
var xn:Number, yn:Number;
var scale:Number =40;
var iterations:Number = 20000;
function f(x:Number):Number{
// too lazy to simplify this at the moment
return((x + .1 + x * (a - c) * x) / [...]