Abyssal
2007-05-18 23:56:31
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Welcome to my FindDTMRotated tutorial!
Let's start off by downloading the attachment picture.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Let's start off with making a DTM, if you are doing this tutorial I assume you know how to do that. Here is what I made:
Create a variable, "dtmComp" and have it be that dtm up there. Also declare x and y as integers. Don't forget to declare a as extended for later.
Good, now the parameters for FindDTMRotated are the following:
So open up that image in paint, and then select the image.
I will explain the following params:
FindDTMRotated(dtmComp, x, y, 0, 0, 100, 100, 0, 360, 0.01, a);
That searches in a 100x100 box, searching 360 degrees, going 0.01 angles at a time. The angle it finds it at is stored in the variable "a".
Use this code:
Most of the code is self-explanatory.
Now, go into paint, and go to the image menu, then flip/rotate menu. Rotate it by either 90, 180, or 270 degrees.
Run the script, and see if it moves the mouse.
I hope this tutorial has helped you understand more about FindDTMRotated.
If you have any questions, please ask here.
Welcome to my FindDTMRotated tutorial!
Let's start off by downloading the attachment picture.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Let's start off with making a DTM, if you are doing this tutorial I assume you know how to do that. Here is what I made:
DTMFromString('78DA63D462606090654005424B18588114231' +
'0FF0702463320431855C9A9FB7FE06A4080510753CDD97BFF51D5' +
'A862AA61903F8EAA460A48C8A02AD97FF01CAA1A75903E5435CC6' +
'23331DDA385AAE6FCD10BA86A8C818402AA1A4B9FA3286A00FE60' +
'13FA');
Create a variable, "dtmComp" and have it be that dtm up there. Also declare x and y as integers. Don't forget to declare a as extended for later.
Good, now the parameters for FindDTMRotated are the following:
FindDTMRotated(DTM, x, y, x1, y1, x2, y2: Integer; StartAngle, EndAngle, AngleStep: Extended; var Angle: Extended): Boolean;
So open up that image in paint, and then select the image.
I will explain the following params:
FindDTMRotated(dtmComp, x, y, 0, 0, 100, 100, 0, 360, 0.01, a);
That searches in a 100x100 box, searching 360 degrees, going 0.01 angles at a time. The angle it finds it at is stored in the variable "a".
Use this code:
var
dtmComp, x, y: Integer;
a: Extended;
begin
dtmComp:= DTMFromString('78DA63D462606090654005424B18588114231' +
'0FF0702463320431855C9A9FB7FE06A4080510753CDD97BFF51D5' +
'A862AA61903F8EAA460A48C8A02AD97FF01CAA1A75903E5435CC6' +
'23331DDA385AAE6FCD10BA86A8C818402AA1A4B9FA3286A00FE60' +
'13FA');
FindDTMRotated(dtmComp, x, y, 0, 0, 100, 100, 0, 360, 0.01, a);
MoveMouse(x, y);
end.
Most of the code is self-explanatory.
Now, go into paint, and go to the image menu, then flip/rotate menu. Rotate it by either 90, 180, or 270 degrees.
Run the script, and see if it moves the mouse.
I hope this tutorial has helped you understand more about FindDTMRotated.
If you have any questions, please ask here.