CX gamer
08-01-2010, 11:44 AM
Hi,
I'm making an attempt to simulate human mouse movements, and I'm making good progress. For that, I needed to write some other functions, which could be useful for other applications too;
{************************************************* ******************************
function GetAngle(xs, ys : extended; xe, ye : integer) : extended;
By: CX
Description: Returns the angle considering 2 points
************************************************** *****************************}
{************************************************* ******************************
function RandomGauss : extended;
By: CX
Description: Returns a random gaussian number between -1 and 1.
************************************************** *****************************}
{************************************************* ******************************
function AngleDiff(a1, a2 : extended) : extended;
By: CX
Description: Calculates the difference between 2 angles in radians
************************************************** *****************************}
But now my problem;
My mouse (Logitec G5) is rather sensitive (moving 1.5 centimeters goes through 1680 pixels), and when I use paint to draw myself a reference for a mouse path, I get this jitter;
http://a.imageshack.us/img838/9224/realmouse.png
* (I could have made the image smaller, sorry)
So I was wondering if it's just me, or if it's standard when using paint's pencil.
Would you guys mind drawing a few lines to a predefined point in paint?
This way I can tweak my script to suit a broader audience, rather than only the hard-users. :)
Thank you in advance,
CX
I'm making an attempt to simulate human mouse movements, and I'm making good progress. For that, I needed to write some other functions, which could be useful for other applications too;
{************************************************* ******************************
function GetAngle(xs, ys : extended; xe, ye : integer) : extended;
By: CX
Description: Returns the angle considering 2 points
************************************************** *****************************}
{************************************************* ******************************
function RandomGauss : extended;
By: CX
Description: Returns a random gaussian number between -1 and 1.
************************************************** *****************************}
{************************************************* ******************************
function AngleDiff(a1, a2 : extended) : extended;
By: CX
Description: Calculates the difference between 2 angles in radians
************************************************** *****************************}
But now my problem;
My mouse (Logitec G5) is rather sensitive (moving 1.5 centimeters goes through 1680 pixels), and when I use paint to draw myself a reference for a mouse path, I get this jitter;
http://a.imageshack.us/img838/9224/realmouse.png
* (I could have made the image smaller, sorry)
So I was wondering if it's just me, or if it's standard when using paint's pencil.
Would you guys mind drawing a few lines to a predefined point in paint?
This way I can tweak my script to suit a broader audience, rather than only the hard-users. :)
Thank you in advance,
CX