Monthly Archives: April 2010

Gesture Capture Performance

I’ll be doing a drawing performance using something I created called Gesture Capture tomorrow April 9th in Brooklyn at the former Engine Co. 212 firehouse. The performance will happen at random intervals between 6pm and 10pm. There will be two other performances going on by Julie Fotheringham, Vera Angelica and Zahava Rozman. Here is some additional information:

Gesture Capture Video and Information
Engine 212 Northside Town Hall Website
google map

Posted in Announcements | Tagged , , | 2 Comments

Relaxing with Sine and Cosine

Last night I wanted to play with sine and cosine waves so I created this snippet:

Actionscript:
  1. var wave:Number = 0;
  2. addEventListener(Event.ENTER_FRAME, onLoop);
  3. function onLoop(evt:Event):void {
  4.        graphics.clear()
  5.        graphics.lineStyle(0,0);
  6.        var time:Number = (stage.stageWidth/2 - mouseX)/10
  7.        for (var j:int = 0; j<100; j++){
  8.                var offset:Number = j/10;
  9.                var t:Number = 0;
  10.                var wh:Number = j * 4;
  11.                for (var i:int = 0; i<300; i++){
  12.                        wave = cos(10-offset, t + time + offset)
  13.                               + sin(time, t/2 + time - offset) + wh
  14.                               + cos(3, t * 4);
  15.                        t += 0.1;
  16.                        var xoff:Number = i * 2;
  17.                        if (i == 0){
  18.                                graphics.moveTo(100 + xoff, 100 + wave);
  19.                        }else{
  20.                                graphics.lineTo(100 + xoff, 100 + wave);
  21.                        }
  22.  
  23.                }
  24.        }
  25. }
  26.  
  27. function cos(radius:Number, theta:Number):Number{
  28.        return radius * Math.cos(theta);
  29. }
  30. function sin(radius:Number, theta:Number):Number{
  31.        return radius * Math.sin(theta);
  32. }


Have a look at the swf...

Posted in Uncategorized | 4 Comments

Recursion Form

Actionscript:
  1. x = y = 10
  2. graphics.lineStyle(1,0);
  3. drawBox(6);
  4.  
  5. function drawBox(iter:Number=10, count:Number=1, y:Number=0, w:Number=500):void{
  6.        if (count <iter){
  7.                var width:Number = w / count
  8.                for (var i:int = 0; i<count; i++){
  9.                    graphics.drawRect(i * width, width * count/w, width, width);
  10.                }
  11.                count++;
  12.                drawBox(iter, count, y, width);
  13.        }
  14. }

This small snippet just draws this image:

If you have an idea for a short recursive snippet. Feel free to post it in the comments.

Posted in Graphics, functions | Tagged , , | 6 Comments

QuickBox2D Editor 2B Released

I'll be releasing the QuickBox2D on googlecode in the near future based on the response to yesterdays post.

Posted in QuickBox2D | Tagged , , , , | 16 Comments