Author Archives: Zevan

Epicycloid Again

CLICK HERE TO COPY
Actionscript:

var xp:Number = 0;

var yp:Number = 0;

var t:Number = 0;

var a:Number = 100;

var b:Number = 10;

x = stage.stageWidth / 2;

y = stage.stageHeight / 2;

 

graphics.lineStyle(0,0x000000);

addEventListener(Event.ENTER_FRAME, onRun);

function onRun(evt:Event):void {

    var p:Number = ((a + b)/b)*t

    xp = (a + b) * Math.cos(t) - b * Math.cos(p);

    yp = (a + b) [...]

Posted in Uncategorized | Tagged , , | 1 Comment

Fish Curve

CLICK HERE TO COPY
Actionscript:

var xp:Number = 0;

var yp:Number = 0;

var t:Number = 0;

var a:Number = 200;

x = stage.stageWidth / 2;

y = stage.stageHeight / 2;

 

graphics.lineStyle(0,0x000000);

addEventListener(Event.ENTER_FRAME, onRun);

function onRun(evt:Event):void {

    xp = a * Math.cos(t) - (a * Math.pow(Math.sin(t),2))/Math.sqrt(2);

    yp = a * Math.cos(t) * Math.sin(t);

    if (t == 0){

      graphics.moveTo(xp, yp);

    [...]

Posted in Math, misc | Tagged , , | Leave a comment

Astroid Pedal Curve Variation

CLICK HERE TO COPY
Actionscript:

var xp:Number = 0;

var yp:Number = 0;

var t:Number = 0;

var r:Number = 200;

x = stage.stageWidth / 2;

y = stage.stageHeight / 2;

 

graphics.lineStyle(0,0x000000);

addEventListener(Event.ENTER_FRAME, onRun);

function onRun(evt:Event):void {

    r = 200 * Math.cos(t / 10);

    xp = r * Math.pow(Math.cos(t), 3);

    yp = r * Math.pow(Math.sin(t), 3);

    if (t == 0){

    [...]

Posted in Math, misc | Tagged , , | Leave a comment

Color Project

I've been working on a project for the led facade at medialab prado. The project has an online component that allows users to name colors, these names are then searched on twitter and displayed on the led facade. Right now our color database has about 530 colors about 20% of which are in spanish. We're [...]

Posted in Uncategorized | 1 Comment