Function High School mathematics to contact a lot of curves, such as sine curve, hyperbola, parabola, if the teaching can use courseware dynamic demonstration of various curves, and can change the parameters of the curve shape or position changes, will help students understand the nature and characteristics of various curves.
I used flash to make math courseware, summed up an effective way to draw various curves. The principle is to skillfully use the parametric equation of the curve to draw the curve, such as the parametric equation of the sine curve is: x=mt;y=asin (mф+ф0), where ф=2пt/t, a point on the curve A (x,y) is a function of variable T, and in the Flash timeline, each frame has a certain time interval, We can look at this time interval as the parameter variable T in the parametric equation, according to the rule in the parameter equation, by changing the position of the movie instance on each frame, we draw the desired curve.
This paper takes sine curve as an example to briefly introduce the method of making mathematical function courseware.
The example is as follows: Click the Play button to draw a parameter default sine curve, in the drawing process, such as clicking the Pause button, you can stop drawing, and then click Play to continue, such as clicking the Exit button, to end the courseware. When you click the Reset button, you can re-enter the parameters, and then click the Play button to draw a sine curve of a different shape. (Figure 1)
Figure 1
The specific production process is as follows.
First, background production
1, Start Flash MX, click the menu bar "Modify/Document", the page set to 600*400, background color set to #ccffff.
2, double-click the "Layer 1" name, and renamed to "Background", and then select the "Line" tool, in the workspace to draw a coordinate system, and then use the "text" tool input like the text of the figure.
3, define the Parameters dialog box. Using the Text tool, create three input text boxes in the workspace, with variable names set to T, A, ф0, and use these three variables to record the values of the parameters. (Figure 2)
Figure 2
4, select the menu bar "Insert/new symbol" and create a new movie named "Dot". In the "Dot" film, use the "oval tool" to draw a circle, the size of 5*5, the color is set to radiate clay charge. Return to the main scene, drag the movie clip "point" from the library to the coordinate system O-point location, and set the movie "dot" instance name to "Dot".
Second, draw the curve
5, create a new layer, and name it "action," and creates three blank keyframes, respectively. Give these three blank keyframes to the action program respectively.
As shown in Figure 3
The mouse selects the first blank key frame, presses the right key, selects "the Action" command in the shortcut menu, brings up "the action" window, sets the parameter initial value, acquires the following statement:
Stop ();//enable runtime to stop at the first frame
c=0;//Set parameter variable initial value
a=100;//set sine wave default amplitude value
ф0=0;//set sine wave initial position value
t=40;//Set sinusoidal cycle value
X0=getproperty ("/dot", _x)//Get the initial X coordinate value of the instance named "Dot" movie
Y0=getproperty ("/dot", _y)//Get the initial y-coordinate value of the instance named "Dot" movie
s=x0;//with the variable s record instance named "dot" to move position in the x direction, the initial position is x0
P=y0; Use the variable p to record the position of the instance named "Dot" in the y direction with the initial position of y0
The mouse selects the second blank key frame, presses the right key, selects "the Action" command in the shortcut menu, brings up "the action" window, acquires the following statement: (This is the concrete application of the parameter equation)
c=c+0.5//Set parameter change amount, the size of the change can determine the degree of density of the drawing curve
SetProperty ("/dot", _x,s)//change the x-coordinate position of the instance named "Dot" movie
SetProperty ("/dot", _y,p)//change the y-coordinate position of the instance named "Dot" movie
ф=2*math.pi*c/t; Calculate the value of a ф
S=x0+5*c; Computes the distance between the instance named "Dot" movie in the direction of X axis
P=y0+a*math.sin (e-ф0);//Compute Instance name "dot" movie move distance in direction of x axis
N=n+1//Increase the variable n value by 1
Duplicatemovieclip ("dot", "dot" add n,9000-n); Record the sine curve by copying the instance named "Dot" movie.
The mouse selects the third blank key frame, presses the right key. Select "Action" on the shortcut menu and bring up the "actions" window and add the following statement:
if (c<=100) {
gotoAndPlay (2); Set the end value of the parameter, if less than the final value, then return to the second frame, continue execution.
}
else{
gotoAndStop (2); If the parameter value is greater than the final value, return and stop at the second frame position
}
Three, set the button
6, create a new layer, and named "button", in the first frame position, select the menu Bar "window/Common Library/button", open the button Common library, select four buttons and then drag to the appropriate location in the workspace. (Figure 1)
7, respectively right click each button, from the shortcut menu select "Action" command, bring up the "action" window, to each button to add action. From left to right The times are:
Reset button:
On (release) {
if (s>600 or p>400) {//guaranteed to be reset when the curve is drawn outside the set area
while (n>0) {
Removemovieclip ("dot" add N);
n = n-1;
}//Remove the drawn curve
c=0;//Recovery Variable Value
s = value of x0;//recovery variable s
p = value of y0;//recovery variable p
}
SetProperty ("Dot", _x, x0);
SetProperty ("Dot", _y, y0);//Make instance named "Dot" movie back to its original location
}
Play Button code:
On (release) {
Play ();
}
Pause Button Code:
On (release) {
Stop ();
}
Exit Button Code:
On (release) {
Fscommand ("Quit");
}
8, click the menu bar "control/test film", can test courseware effect, if no problem, you can through the menu bar "file/publish" command to generate SWF format files, courseware production completed.
Summary: The key of this courseware is to make use of the parametric equation of the curve skillfully, so long as the sine wave parameter equation of this courseware is changed into other curve parameter equation, we can draw the other curve graph. At last, the parametric equations of some common curves are listed for everyone to try.
Hyperbola: x=x0+asecф;y=y0+btgф;ф=2пt/t parabola: x=x0+2pt2;y=y0+2pt
Straight lines: X=x0+tcosα;y=y0+sinα circles and ellipses: x=x0+asinф;y=y0+bcosф;ф=2пt/t
Round involute: X=r (Cosф+фsinф); Y=r (sinф-фcosф); ф=2пt/t
Note: in the writing sine wave parameter equation, we are accustomed to using T to represent the parameter variable, but because there is also a T-cycle variable, in Flash, the variable is not case-sensitive, so in this case, I put the parameter variable in C instead of T.