Run those on paint with pencil selected. Notice the differences. The first one has double the points and the i is multiplied by half as much. These 2 things balance each other out. Which is why the waves have the same height and width. Yet the first one looks better because there are more points. It's like a picture with many small pixels looks better than one with a less big pixels. Also since the first one is smaller the random is smaller. Just keep on playing with the numbers til it looks human.
Code:
{.Script Info:
# ScriptName = Sine test.
# Author = Solarwind
# Description = More Advanced Mouse functions.
# Version = 0.01
# Date = October 31, 2006.
# Comments = ..::[ Use Linux ]::..
/Script Info}
{=================================================================================================]
[ ]
[ ____ ___ __ ]
[ /\ _`\ /\_ \ __ /\ \ ]
[ \ \,\L\_\ ___\//\ \ __ _ __ __ __ __/\_\ ___ \_\ \ ]
[ \/_\__ \ / __`\\ \ \ /'__`\ /\`'__\/\ \/\ \/\ \/\ \ /' _ `\ /'_` \ ]
[ /\ \L\ \/\ \L\ \\_\ \_/\ \L\.\_\ \ \/ \ \ \_/ \_/ \ \ \/\ \/\ \/\ \L\ \ ]
[ \ `\____\ \____//\____\ \__/.\_\\ \_\ \ \___x___/'\ \_\ \_\ \_\ \___,_\ ]
[ \/_____/\/___/ \/____/\/__/\/_/ \/_/ \/__//__/ \/_/\/_/\/_/\/__,_ / ]
[ ]
[ ]
[ ]
[=================================================================================================}
Program New;
{.include SRL/SRL.scar}
Type
CoArray = Record
x, y : Integer;
End;
Function MakePath() : Array Of CoArray;
Var
NArray : Array Of CoArray;
i : Integer;
Begin
i := 0;
SetArrayLength(NArray, 100);
Repeat
NArray[i].x := i*15 + Random(10);
NArray[i].y := Round(Sin((i/2)*1) *50) + Random(1);
i := i + 1;
Until(i =40)
Result := NArray;
End;
Var
myarray : Array of CoArray;
i : Integer;
Begin
SetupSRL;
SetArrayLength(myarray, 100000)
//mousespeed:=30;
myarray := MakePath();
MMouse(50, 200, 0, 0);
holdmouse(50,200,true);
Sleep(10) Repeat
//repeat
// wait(4);
//until isfkeydown(11);
MMouse(myarray[i].x + 50, myarray[i].y + 200, 0, 0);
i := i + 1;
Sleep(5);
Until((i = 40) or isfkeydown(12)) ;
getmousepos(x,y);
releasemouse(x,y,true);
WriteLn('Array length of myarray is: ' + IntToStr(GetArrayLength(myarray)));
End.
Code:
{.Script Info:
# ScriptName = Sine test.
# Author = Solarwind
# Description = More Advanced Mouse functions.
# Version = 0.01
# Date = October 31, 2006.
# Comments = ..::[ Use Linux ]::..
/Script Info}
{=================================================================================================]
[ ]
[ ____ ___ __ ]
[ /\ _`\ /\_ \ __ /\ \ ]
[ \ \,\L\_\ ___\//\ \ __ _ __ __ __ __/\_\ ___ \_\ \ ]
[ \/_\__ \ / __`\\ \ \ /'__`\ /\`'__\/\ \/\ \/\ \/\ \ /' _ `\ /'_` \ ]
[ /\ \L\ \/\ \L\ \\_\ \_/\ \L\.\_\ \ \/ \ \ \_/ \_/ \ \ \/\ \/\ \/\ \L\ \ ]
[ \ `\____\ \____//\____\ \__/.\_\\ \_\ \ \___x___/'\ \_\ \_\ \_\ \___,_\ ]
[ \/_____/\/___/ \/____/\/__/\/_/ \/_/ \/__//__/ \/_/\/_/\/_/\/__,_ / ]
[ ]
[ ]
[ ]
[=================================================================================================}
Program New;
{.include SRL/SRL.scar}
Type
CoArray = Record
x, y : Integer;
End;
Function MakePath() : Array Of CoArray;
Var
NArray : Array Of CoArray;
i : Integer;
Begin
i := 0;
SetArrayLength(NArray, 100);
Repeat
NArray[i].x := i*30 + Random(10);
NArray[i].y := Round(Sin((i)*1) *50) + Random(1);
i := i + 1;
Until(i =20)
Result := NArray;
End;
Var
myarray : Array of CoArray;
i : Integer;
Begin
SetupSRL;
SetArrayLength(myarray, 100000)
//mousespeed:=30;
myarray := MakePath();
MMouse(50, 200, 0, 0);
holdmouse(50,200,true);
Sleep(10) Repeat
//repeat
// wait(4);
//until isfkeydown(11);
MMouse(myarray[i].x + 50, myarray[i].y + 200, 0, 0);
i := i + 1;
Sleep(5);
Until((i = 20) or isfkeydown(12)) ;
getmousepos(x,y);
releasemouse(x,y,true);
WriteLn('Array length of myarray is: ' + IntToStr(GetArrayLength(myarray)));
End.