Today I read my high school mathematics book once and found that it is really a great fortune. Using parameterized equations in mathematics can create more results for flash. For example, we set X as the angle for the elliptical parametric equation. If we know the parametric equation, we can calculate the coordinates of any M (x, y) Point.
X = A * cosx
Y = B * SiNx
For example
VaR ANGEL: number;
VaR speed: Number = 0;
VaR array: array = new array ();
For (var I: Int = 0; I <10; I ++)
{
VaR copyball: ball = new ball ();
Copyball. addeventlistener (event. enter_frame, runing );
Array. Push (copyball );
Addchild (array [I]);
}
Function runing (Event: Event): void {
For (var j: Int = 0; j <10; j ++)
{
Angel = (J * Math. Pi * 2/9) + speed;
Trace (Angel );
Array [J]. x = 230 + 50 * Math. Cos (Angel );
Array [J]. Y = 200 + 200 * Math. Sin (Angel );
Array [J]. scalex = 0.5 * Math. Sin (Angel) + 0.7;
Array [J]. scaley = 0.5 * Math. Sin (Angel) + 0.7;
Array [J]. Alpha = 0.5 * Math. Sin (Angel) + 0.7;
}
Speed ++ = 0.003;
}
For example:
Array [J]. x = 230 + 50 * Math. Cos (Angel );
Array [J]. Y = 200 + 200 * Math. Sin (Angel );
This is an application of parameterized equations. (230,200) is the coordinate after the elliptical translation, while
X = 50 * Math. Cos (Angel );
Y = 200 * Math. Sin (Angel );
This is the parameterized equation we are going to talk about today. In order to get any M (x, y), we can use the geometric mathematics of high school to know its wonders. As long as we know about the parameter equation, you can create a lot of magical effects. For example, some of the frequently used high-school parameterization equations in physical motion can be used to calculate some good examples of the above throwing and oblique throwing motion. This is an introduction. In the future, I will write all my notes here as my backup. Flash