graphoon.org

Documentaion This expresion to draw lines and shape.

How to draw line by formula

use "plot"

plot x-2

Arithmetical operation

You can use these following operator

OperatorFunctionExample
+ Addition plot x+3
- Subtraction plot x-3
* Multiplication plot 3*x
/ Division plot x/3
^ Involution plot x^2
% Surplus plot x%3

Functional command

You can use these following command to operate mathematically.Actionscript3.0 Math Class

MethodFunctionExample
pow Computes and returns val1 to the power of val2. plot pow(x, 2)
log Returns the natural logarithm of the parameter val. plot log(10)
sin, cos, tan Trigonometric plot cos(x)
sqrt Computes and returns the square root of the specified number. plot sqrt(4)
PI A mathematical constant for the ratio of the circumference of a circle to its diameter, expressed as pi, with a value of 3.141592653589793. plot PI
E A mathematical constant for the base of natural logarithms, expressed as e. plot E

Specification of varying area

You can plot between varying area, when you define the scope.

plot [-5:10] 0.1*x^2

媒介変数を用いた曲線を描画できます。

tをラジアンとしてxの式とyの式を指定してあげることで円などの様々な曲線を描画できます。いろいろ試してみてぜひグラフを保存してみてください。

plot x=cos(t), y=sin(t)

How to draw shape on graph

use "draw" command

draw line({x:0, y:0}, {x:5, y:5})

It is possible to draw on the graph in figures of the straight line, the triangle, the quadrangle, and yen, etc. by specifying coordinates.

MethodFunctionExample
line It draws in the straight line specifying two points. draw line({x:0, y:0}, {x:5, y:5})
triangle It draws in the triangle specifying three points. draw triangle({x:0, y:0}, {x:3, y:0}, {x:0, y:3})
rectangle draw rectangle draw rectangle({x:0, y:0, w:3, h:3})
circle draw circle draw circle({x:0, y:0}, 3)
point draw point draw point({x:1, y:1})

How to move line and shape

use "move" command

move(1, {x:1, y:1})

How to specify scope"

The range where x changes is definable specifying it.

set xrange = [-5:10]

The range of y axis can be specified.

set yrange = [-5:10]

How to set title

The title can be set to the made graph.

set title = 2次関数のグラフ
©2008 fushan|English|Japanese