program Show_Functions(input,output);
(* 坂本 正彦 : 導関数の描画 *)
uses Crt, graph, Turtle1;
var 省略
function fx1( x : real ) : real;
begin
fx1 := m*sin(x) + n*cos(x);
end;
function fx2( x : real ) : real;
begin
fx2 := k*sin(x+t);
end ;
procedure Shokichi; 省略
procedure Ten; 省略
procedure Draw_Function1;
var i, x, y : real;
begin
i := -x_range;
y := 0; end.
|
while i <= x_range do
begin
x := i; y := fx1(x);
if abs(y)<= y_range then
Ten( round(200*x/x_range),
round(200*y/y_range),col);
i := i + sg_d;
end;
end;
procedure Draw_Function2; 省略
procedure Zahyojiku; 省略
begin (* MainProgram *)
Initturtle;
Shokichi; Zahyojiku;
m := 3; n := 4;
col := blue; Draw_Function1;
k := 5; t := 0.93;
col := red; Draw_Function2;
end.
|