The trigonometric values are multiplied by 1000 to avoid the problem of having no decimal point numbers. Then variable 00 will now have the values 500 and 866. Let's do an example: let's say the variable 0001 contains the value 60, and you've called upon "CreatTrigTable" with it's default values. Just call it once, and then you can call the event "GetCoSinusA()" to get the trigonometric values. Once these four variables are set, you don't have to do anything more with the event. outside the normal variable array range, so it's less likely that you have to do anything with this variable. it's set to be stored from variable 10000 to 10724 by default, i.e. The next variable operation deals with where you want the variables containing the "lookup table" to be. The first is which variable the cosine should be returned to, and the second which variable to sine should be returned to. These signify in which variables the result should be placed. Same deal for the next two variable operations. Remember, it's the number you should change, not the variable itself. At default, it's set to 1, meaning that you're very first variable in the list will be used unless you set it to something else. What this means, is that the number you set that variable equal to, will be ID of the variable used as the angle for determining the value of the sine and cosine. The first variable operation has a comment above it saying "Set ID of argument variable (angle)". So let's look at the event scripts, the first being "CreateTrigTable". There are a few here and there among them which aren't being used, and some could be repositioned without too much trouble, but most likely it will be easier just to keep those variables free when using these events. They require the variables 101 to 160 to work properly. This is one way to understand trigonometry for some uses, and it can be pretty useful If you still don't get angles to well and stuff, you could give this little game a try: Trigonometry game The project includes 5 common event scripts. If we have a picture which will move instantly to coordinate x and y, and these are generated getting the sine and cosine for a angle, then increase the angle before moving the picture again, it will move around in a circle. if you multiply the radius of the circle sine of 30 degrees, i.e. with a 30 degree angle, the line generated from that will hit the circle at 866 along the x axis and 500 along the y axis. In this example, the angle is 30 degrees. In a circle with radius 1000, if you have an angle rising from the x axis, the trigonometric functions will return the coordinates in x and y on the circle given the angle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |