Unified · Split
| @@ -0,0 +1,9 @@ | |||
| 1 | \hsize 0pt | ||
| 2 | \vsize 0pt | ||
| 3 | \nopagenumbers | ||
| 4 | \overfullrule 0pt | ||
| 5 | \noindent | ||
| 6 | $$ | ||
| 7 | y(n) = (a x(n - 1) + b x(n) + c x(n + 1) + d x(n + 2)) \cdot f + x(n) | ||
| 8 | $$ | ||
| 9 | \bye | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | \hsize 0pt | ||
| 2 | \vsize 0pt | ||
| 3 | \nopagenumbers | ||
| 4 | \overfullrule 0pt | ||
| 5 | \noindent | ||
| 6 | $$ | ||
| 7 | x(n) = (5^{6}x(n - 1) + 1) \& 0xFFFF | ||
| 8 | $$ | ||
| 9 | \bye | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | \hsize 0pt | ||
| 2 | \vsize 0pt | ||
| 3 | \nopagenumbers | ||
| 4 | \overfullrule 0pt | ||
| 5 | \noindent | ||
| 6 | $ | ||
| 7 | c | ||
| 8 | $ | ||
| 9 | \bye | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | \hsize 0pt | ||
| 2 | \vsize 0pt | ||
| 3 | \nopagenumbers | ||
| 4 | \overfullrule 0pt | ||
| 5 | \noindent | ||
| 6 | $$ | ||
| 7 | y(n) = | c y(n - 1) - y(n - 2) - \gamma | | ||
| 8 | $$ | ||
| 9 | \bye | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | \hsize 0pt | ||
| 2 | \vsize 0pt | ||
| 3 | \nopagenumbers | ||
| 4 | \overfullrule 0pt | ||
| 5 | \noindent | ||
| 6 | $ | ||
| 7 | \gamma | ||
| 8 | $ | ||
| 9 | \bye | ||
| @@ -1,4 +1,9 @@ | |||
| 1 | FIGS=\ | 1 | FIGS=\ |
| 2 | bigverb_interpolation.png \ | ||
| 3 | bigverb_rng.png \ | ||
| 4 | chaosnoise_c.png \ | ||
| 5 | chaosnoise_eqn.png \ | ||
| 6 | chaosnoise_gamma.png \ | ||
| 2 | osc_lerp.png \ | 7 | osc_lerp.png \ |
| 3 | osc_lerp_simp.png \ | 8 | osc_lerp_simp.png \ |
| 4 | osc_log2.png \ | 9 | osc_log2.png \ |
| @@ -763,9 +763,12 @@ Calculate interpolation. Using the coefficents · 762 unmodified lines | |||
| 763 | described above and the fractional component =f=, one can compute | 763 | described above and the fractional component =f=, one can compute |
| 764 | cubic interpolation with the following expression: | 764 | cubic interpolation with the following expression: |
| 765 | 765 | ||
| 766 | $$ | 766 | @!(fig "bigverb_interpolation" |
| 767 | `` | ||
| 767 | y(n) = (a x(n - 1) + b x(n) + c x(n + 1) + d x(n + 2)) \cdot f + x(n) | 768 | y(n) = (a x(n - 1) + b x(n) + c x(n + 1) + d x(n + 2)) \cdot f + x(n) |
| 768 | $$ | 769 | `` |
| 770 | ) | ||
| 771 | !@ | ||
| 769 | 772 | ||
| 770 | #+NAME: compute_interpolation | 773 | #+NAME: compute_interpolation |
| 771 | #+BEGIN_SRC c | 774 | #+BEGIN_SRC c |
| @@ -902,7 +905,9 @@ previous random value. · 130 unmodified lines | |||
| 902 | The RNG algorithm used is quite simple, and is used to | 905 | The RNG algorithm used is quite simple, and is used to |
| 903 | produce a 16-bit value. | 906 | produce a 16-bit value. |
| 904 | 907 | ||
| 905 | $$x(n) = (5^{6}x(n - 1) + 1) \& 0xFFFF$$ | 908 | @! |
| 909 | (fig "bigverb_rng" ``x(n) = (5^{6}x(n - 1) + 1) \& 0xFFFF``) | ||
| 910 | !@ | ||
| 906 | 911 | ||
| 907 | Before and after this equation, the value is balanced so that | 912 | Before and after this equation, the value is balanced so that |
| 908 | is a 16-bit bipolar signal. | 913 | is a 16-bit bipolar signal. |
| @@ -239,12 +239,14 @@ sample gets computed. · 238 unmodified lines | |||
| 239 | 239 | ||
| 240 | This uses the following difference equation: | 240 | This uses the following difference equation: |
| 241 | 241 | ||
| 242 | $$ | 242 | @! |
| 243 | y(n) = | c y(n - 1) - y(n - 2) - \gamma | | 243 | (fig "chaosnoise_eqn" |
| 244 | $$ | 244 | ``y(n) = | c y(n - 1) - y(n - 2) - \gamma |``) |
| 245 | 245 | !@ | |
| 246 | Where $c$ is the chaos value, and $\gamma$ is a nonlinearity | 246 | |
| 247 | set to be =0.05=. | 247 | Where @!(smallfig "chaosnoise_c" "c")!@ is the chaos value, |
| 248 | and @!(smallfig "chaosnoise_gamma" "\\gamma")!@ is a | ||
| 249 | nonlinearity set to be =0.05=. | ||
| 248 | 250 | ||
| 249 | After the output value is computed, the coefficients are | 251 | After the output value is computed, the coefficients are |
| 250 | updated. | 252 | updated. |
| @@ -13,3 +13,19 @@ · 12 unmodified lines | |||
| 13 | (file/write fp eqn) | 13 | (file/write fp eqn) |
| 14 | (file/write fp "\n$$\n\\bye") | 14 | (file/write fp "\n$$\n\\bye") |
| 15 | (file/close fp)) | 15 | (file/close fp)) |
| 16 | |||
| 17 | (defn smallfig [name eqn &opt dir] | ||
| 18 | (default dir ".") | ||
| 19 | (var fp (file/open (string dir "/" name ".tex") :w)) | ||
| 20 | (file/write | ||
| 21 | fp | ||
| 22 | (string | ||
| 23 | "\\hsize 0pt\n" | ||
| 24 | "\\vsize 0pt\n" | ||
| 25 | "\\nopagenumbers\n" | ||
| 26 | "\\overfullrule 0pt\n" | ||
| 27 | "\\noindent\n" | ||
| 28 | "$\n")) | ||
| 29 | (file/write fp eqn) | ||
| 30 | (file/write fp "\n$\n\\bye") | ||
| 31 | (file/close fp)) | ||
| @@ -97,3 +97,11 @@ · 96 unmodified lines | |||
| 97 | (string "/" fig-dir "/" name ".png") | 97 | (string "/" fig-dir "/" name ".png") |
| 98 | (string webroot "/" fig-dir "/" name ".png")) | 98 | (string webroot "/" fig-dir "/" name ".png")) |
| 99 | eqn)) | 99 | eqn)) |
| 100 | |||
| 101 | (defn smallfig (name eqn) | ||
| 102 | (if write-tex (fig/smallfig name eqn fig-dir)) | ||
| 103 | (img | ||
| 104 | (if (ww-server?) | ||
| 105 | (string "/" fig-dir "/" name ".png") | ||
| 106 | (string webroot "/" fig-dir "/" name ".png")) | ||
| 107 | eqn)) | ||