Author Archives: Zevan

Interesting Texture #3

CLICK HERE TO COPY
Actionscript:

var canvas:BitmapData = new BitmapData(1500,1000,false, 0x000000);

addChild(new Bitmap(canvas));

scaleX = scaleY = .5;

 

var w:int = canvas.width;

var w10:int = w * 80;

var convert:Number = Math.PI/180;

var size:int = canvas.width * canvas.height;

for (var i:int = 0; i<size; i++){

    var xp:int = i % w;

    var yp:int = int(i / w);

    var xp2:int = xp [...]

Posted in BitmapData, pixel manipulation, setPixel | Tagged , , | Leave a comment

Interesting Texture #2

CLICK HERE TO COPY
Actionscript:

var canvas:BitmapData = new BitmapData(1000,1000,false, 0x000000);

addChild(new Bitmap(canvas));

scaleX = scaleY = .5;

 

var w:int = canvas.width;

var w10:int = w * 40;

var size:int = canvas.width * canvas.height;

for (var i:int = 0; i<size; i++){

    var xp:int = i % w;

     

    var yp:int = int(i / w);

    var c1:int = (255/8) * [...]

Posted in BitmapData, misc, pixel manipulation, setPixel | Tagged , , | Leave a comment

Interesting Texture

CLICK HERE TO COPY
Actionscript:

var canvas:BitmapData = new BitmapData(1000,1000,false, 0x000000);

addChild(new Bitmap(canvas));

scaleX = scaleY = .5;

 

var w:int = canvas.width;

var w10:int = w * 60;

var size:int = canvas.width * canvas.height;

for (var i:int = 0; i<size; i++){

    var xp:int = i % w;

     

    var yp:int = int(i / w);

    var c1:int = (255/8) * [...]

Posted in BitmapData, pixel manipulation, setPixel | Tagged , , | Leave a comment

Gumdrop Torus

CLICK HERE TO COPY
Actionscript:

var matrix:Matrix3D = new Matrix3D();

 

var verts:Vector.<Number> = new Vector.<Number>();

var pVerts:Vector.<Number> = new Vector.<Number>();

var uvts:Vector.<Number> = new Vector.<Number>();

 

for (var i:Number = -2; i<2; i+=.04){

    for (var j:Number = -2; j<2; j+=.04){

        for (var k:Number = -2; k<2; k+=.04){

// equation from: http://local.wasp.uwa.edu.au/~pbourke/geometry/gumdrop/

            var yz:Number = [...]

Posted in 3D, BitmapData, Math | Tagged , , | Leave a comment