片対数グラフ

by yd_niku
♥0 | Line 22 | Modified 2010-05-12 22:10:39 | MIT License
play

ActionScript3 source code

/**
 * Copyright yd_niku ( http://wonderfl.net/user/yd_niku )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/13HU
 */

package {
    import flash.display.Sprite;
    [SWF(backgroundColor=0x00)]
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            const WIDTH:int = 465;
            const HEIGHT:int = 465;
                
var hlz:int = 0;
var base:Number = Math.log(220500);

graphics.lineStyle( 0, 0xff00 );

for( var i:int=0; i<6; i++ ) {
	hlz = Math.pow(10,i);
	for( var j:int=1; j<10; j++ ) {
		var p:Number = Math.log(Math.pow(10,i)*j)/ base;
		
		var tx:Number = p*WIDTH;
		graphics.moveTo( tx, 0 );
		graphics.lineTo( tx, HEIGHT );
	}
}
        }
    }
}

Forked