In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

円弧の繰り返し

arcを使った円弧のサンプル
Get Adobe Flash player
by shmdmoto 18 Oct 2010
    Embed
/**
 * Copyright shmdmoto ( http://wonderfl.net/user/shmdmoto )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/5pR1
 */

// forked from shmdmoto's 曲線を描く
package 
{
    import frocessing.display.F5MovieClip2D;
    import flash.display.CapsStyle;
    /**
     * 五芒星形を描く
     * @author shmdmoto
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            var i:int;
            colorMode(HSB, 360, 100, 100, 100);
            noFill();
            strokeWeight(15);
            strokeCap(CapsStyle.SQUARE);
            for( i = 3 ; i < 15 ; i++ ){
                var angle:int = random(270)-90;
                stroke(random(360),100,100,40);
                arc(465/2, 465/2, 30 * i, 30 * i, 
                radians(angle), radians(angle+random(270))); 
            }
            for( i = 3 ; i < 15 ; i++ ){
                angle = random(270)-90;
                stroke(random(360),100,100,40);
                arc(465/3, 465/1.5, 30 * i, 30 * i, 
                radians(angle), radians(angle+random(270))); 
            }
            for( i = 3 ; i < 15 ; i++ ){
                angle = random(270)-90;
                stroke(random(360),100,100,40);
                arc(465/1.2, 465/4, 30 * i, 30 * i, 
                radians(angle), radians(angle+random(270))); 
            }
            for( i = 3 ; i < 15 ; i++ ){
                angle = random(270)-90;
                stroke(random(360),100,100,40);
                arc(100, 150, 30 * i, 30 * i, 
                radians(angle), radians(angle+random(270))); 
            }
        }
    }
}