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) [...]
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 actionscript, as3, flash |
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 actionscript, as3, flash |
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 [...]