Actionscript:
-
x = stage.stageWidth / 2;
-
y = stage.stageHeight / 2;
-
scaleX = scaleY = 3;
-
-
var t:Number =-5;
-
var xp:Number = 0;
-
var yp:Number = 0;
-
-
addEventListener(Event.ENTER_FRAME, onLoop);
-
function onLoop(evt:Event):void {
-
xp = t;
-
yp = sinh(t);
-
-
graphics.lineStyle(0,0);
-
if (t == -5){
-
graphics.moveTo(xp, yp);
-
}else{
-
graphics.lineTo(xp, yp);
-
}
-
if (t> 5){
-
removeEventListener(Event.ENTER_FRAME, onLoop);
-
}
-
t+=.2;
-
}
-
function sinh(x:Number):Number{
-
return (Math.pow(Math.E, x) - Math.pow(Math.E, -x)) * 0.5;
-
}
Just a quick plot to test the sinh() function from a few days ago...