g1 added at end to create let animation repeat smoothly
15
Вираз 16: 0 equals "g" left parenthesis, "x" , "y" , right parenthesis0=gx,y
16
Transformation
Приховати цю папку від студентів.
17
Basic Idea:
Given two graphs g and f, 1*g + 0*f show g; 0*g + 1*f shows f.
Have a variable 0 < t < 1, (1-t)*g + t*f gives a linear transformation between g and f. g fades out while f fades in.
It works just like interpolation methods.
18
Вираз 19: "T" equals 2.0 3 2T=2.032
11
length left parenthesis, "g" left parenthesis, 0 , 0 , right parenthesis , right parenthesis minus 0.0 0 1lengthg0,0−0.001
Вираз 21: "f" Subscript, 0 , Baseline left parenthesis, "x" , right parenthesis equals StartFraction, tanh left parenthesis, "s" Subscript, "p" "e" "e" "d" , Baseline "x" , right parenthesis plus 1 Over 2 , EndFractionf0x=tanhspeedx+12
21
Вираз 22: "f" Subscript, "a" "d" "e" , Baseline left parenthesis, "x" , right parenthesis equals "f" Subscript, 0 , Baseline left parenthesis, mod left parenthesis, 2 left parenthesis, "x" plus 1 , right parenthesis , 2 , right parenthesis minus 1 , right parenthesisfadex=f0mod2x+1,2−1
22
f0 = smooth transition from 0 to 1
f1 = repeat of f0 and faster
Problemf0 & f1 never touches 0 and 1. They only approach it.
f_adeIn makes sure f(0) touches 0 and f(1) touches 1.
23
Вираз 24: "g" Subscript, "f" "a" "d" "e" "O" "u" "t" , Baseline left parenthesis, "x" , "y" , right parenthesis equals "g" left parenthesis, "x" , "y" , right parenthesis left bracket, "T" , right bracket times left parenthesis, 1 minus "f" Subscript, "a" "d" "e" , Baseline left parenthesis, "T" , right parenthesis , right parenthesisgfadeOutx,y=gx,yT·1−fadeT
24
Вираз 25: "g" Subscript, "f" "a" "d" "e" "I" "n" , Baseline left parenthesis, "x" , "y" , right parenthesis equals "g" left parenthesis, "x" , "y" , right parenthesis left bracket, "T" plus 1 , right bracket times "f" Subscript, "a" "d" "e" , Baseline left parenthesis, "T" , right parenthesisgfadeInx,y=gx,yT+1·fadeT
25
Вираз 26: "g" left parenthesis, "x" , "y" , right parenthesis left bracket, "T" , right bracket equals 0gx,yT=0
26
Вираз 27: "g" left parenthesis, "x" , "y" , right parenthesis left bracket, "T" plus 1 , right bracket equals 0gx,yT+1=0
27
Current graph fades out, while next graph fades in.
28
Вираз 29: "g" Subscript, "f" "a" "d" "e" "O" "u" "t" , Baseline left parenthesis, "x" , "y" , right parenthesis plus "g" Subscript, "f" "a" "d" "e" "I" "n" , Baseline left parenthesis, "x" , "y" , right parenthesis equals 0gfadeOutx,y+gfadeInx,y=0