バラ曲線 その2?
http://www.ayu.ne.jp/user/fujisaki/graph1.htm
♥0 |
Line 10 |
Modified 2010-06-26 20:32:58 |
MIT License
archived:2017-03-29 12:44:58
ActionScript3 source code
/**
* Copyright 12346 ( http://wonderfl.net/user/12346 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/A0Hi
*/
//http://www.ayu.ne.jp/user/fujisaki/graph1.htm
package{import flash.display.*;import flash.events.Event
public class g extends Sprite{
public var t:Number=0,C:Shape=new Shape,R:Graphics=C.graphics
public function g(){addChild(C).x=C.y=232;R.lineStyle(0),R.moveTo(f(0),0)
addEventListener("enterFrame",function():void{
var r:Number=f(t+=1/64);R.lineTo(r*Math.cos(t),r*Math.sin(t))
})}
public function f(t:Number):Number{return(
57+128*Math.cos(2.5*t)-38*Math.cos(7.5*t)
)}}}