Cannabis Curve

by 12346
http://mathworld.wolfram.com/CannabisCurve.html
日本語名は何だろう
♥0 | Line 10 | Modified 2010-06-26 20:31:32 | MIT License
play

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/oTSq
 */

//http://mathworld.wolfram.com/CannabisCurve.html
//日本語名は何だろう
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/256);R.lineTo(r*Math.cos(t),r*Math.sin(t))
 })}
 public function f(t:Number):Number{return(

  (10+9*Math.cos(8*t))*(10+Math.cos(24*t))*(9+Math.cos(200*t))*(1+Math.sin(t))/16

)}}}