グラフィックス機能

上でも述べたように, 例えば, sin x の関数のグラフを書くには, 次のように入力します.
> plot(sin(x), x = -Pi .. Pi);

2変数関数のグラフも簡単に書けます.

> plot3d(cos(2*x^3+y^2), x=-2..2, y=-2..2);
マウスの左ボタンで図形を掴んで動かせば, 立方体が動きます.

Mapleでは, 座標を順に与えてそれを線分で結び多角形を描く事ができます. まずは, グラフィック表示のためのパッケージ plots を読み込みます.

> with(plots);
次を実行して見て下さい.
 
> cornercoordinates := [[0,0],[1,0],[1,-1] ,[0,-1]]:
> asquare := polygonplot(cornercoordinates):
> display(asquare);
> ngon := n -> [seq([cos(2*Pi*i/n),sin(2*Pi*i/n) ], i = 1..n)]:
> display([polygonplot(ngon(8))]);
> fivestar:=[seq([cos(2*Pi*(2*i+1)/5),sin(2*Pi*(2*i+1)/5)], i = 1..5)]:
> display([polygonplot](fivestar));

student
2014-07-04