lardmaster
2006-10-21 15:49:52
hmm.. i dont know about anyone else, but frequently when on the computer, i swirl the mouse in circles when im bored. i wrote this program to do that, i just wanted to see what other people think of it and how many parameters it should have before i turn it into a procedure. perhaps it could be part of boredhuman!
EDIT: UBERUPDATE!!!~!!!
any comments on its randomness, or any questions are welcome.
EDIT: i did uberupdate, i dont see much wrong with it now
EDIT2:tweaked a little, was doing too big circles, going to edge of screen.
EDIT: UBERUPDATE!!!~!!!
program coolcircles;
var i,offsetsin,offsetcos:extended;
tox,toy,lastx,lasty,xmove,ymove,centerx,centery,deformx,deformy:integer;
reverse:boolean;
begin
reverse:=random(2)=1;
sleep(1000);
getmousepos(centerx,centery);
centerx:=centerx-100;
deformx:=100;
deformy:=100;
while (i<random(25)+40) and (i>-1*(random(25)+40))do begin
if random(20)=1 then begin
offsetsin:=random(round(Pi()*100/3))/100;
offsetcos:=random(round(pi()*100/3))/100;
end
if random(12)=1 then deformx:=deformx-17+random(38);
if random(12)=1 then deformy:=deformy-17+random(38);
xmove:=random(3)-1;
ymove:=random(3)-1;
tox:=round(cos(i+offsetcos)*deformx)+xmove+centerx;
toy:=round(sin(i+offsetcos)*deformy)+ymove+centery;
movemouse(tox,toy);
sleep(random(2)+1);
if not reverse then i:=i+20/sqrt(sqr(deformx)+sqr(deformy))
else i:=i-20/sqrt(sqr(deformx)+sqr(deformy));
getmousepos(lastx,lasty);
if random(20)=1 then begin
getmousepos(lasty,lasty);
centerx:=round(lastx-(cos(i)*deformx))+random(21)-10;
centery:=round(lasty-(sin(i)*deformy))+random(21)-10;
end
end
i:=0;
getmousepos(centerx,centery);
deformx:=200;
deformy:=5;
offsetsin:=Pi()/3;
offsetcos:=0;
if random(3)=1 then begin
reverse:=random(2)=1;
while (i<15+random(10)) and (i>-1*(15+random(10))) do begin
if random(2)=1 then begin
offsetcos:=random(round(pi*100/2))/100;
offsetsin:=random(round(pi*100/2))/100;
end
if random(60)=1 then begin
deformx:= 150+random(100);
deformy:= 3+random(10);
end
xmove:=random(3)-1;
ymove:=random(3)-1;
movemouse(round(cos(i+offsetcos)*deformx+centerx+xmove),round(sin(i+offsetsin)*deformy)+centery+ymove);
if not reverse then i:=i+0.2
else i:=1-0.2;
sleep(5);
end
end
//pickupmouse procedures but i dont want to
//include srl because compling is slow on my comp
end.
any comments on its randomness, or any questions are welcome.
EDIT: i did uberupdate, i dont see much wrong with it now
EDIT2:tweaked a little, was doing too big circles, going to edge of screen.
note: the very long straght lines are when i used HoldMouse but the script starts in another place, so it draws that very long line