History

more figures

Paul Batchelor committed 6 years ago

Commit e8dafec1 parent 3446b4410 files · +90 −9Browse files

Unified · Split

10 files
  1. _fig/bigverb_interpolation.tex +9 −0
  2. _fig/bigverb_rng.tex +9 −0
  3. _fig/chaosnoise_c.tex +9 −0
  4. _fig/chaosnoise_eqn.tex +9 −0
  5. _fig/chaosnoise_gamma.tex +9 −0
  6. _fig/figs.mk +5 −0
  7. bigverb.org +8 −3
  8. chaosnoise.org +8 −6
  9. fig.janet +16 −0
  10. weewiki.janet +8 −0
_fig/bigverb_interpolation.tex+9−0
@@ -0,0 +1,9 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7y(n) = (a x(n - 1) + b x(n) + c x(n + 1) + d x(n + 2)) \cdot f + x(n)
8$$
9\bye
_fig/bigverb_rng.tex+9−0
@@ -0,0 +1,9 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7x(n) = (5^{6}x(n - 1) + 1) \& 0xFFFF
8$$
9\bye
_fig/chaosnoise_c.tex+9−0
@@ -0,0 +1,9 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$
7c
8$
9\bye
_fig/chaosnoise_eqn.tex+9−0
@@ -0,0 +1,9 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$$
7y(n) = | c y(n - 1) - y(n - 2) - \gamma |
8$$
9\bye
_fig/chaosnoise_gamma.tex+9−0
@@ -0,0 +1,9 @@
1\hsize 0pt
2\vsize 0pt
3\nopagenumbers
4\overfullrule 0pt
5\noindent
6$
7\gamma
8$
9\bye
_fig/figs.mk+5−0
@@ -1,4 +1,9 @@
1FIGS=\1FIGS=\
2bigverb_interpolation.png \
3bigverb_rng.png \
4chaosnoise_c.png \
5chaosnoise_eqn.png \
6chaosnoise_gamma.png \
2osc_lerp.png \7osc_lerp.png \
3osc_lerp_simp.png \8osc_lerp_simp.png \
4osc_log2.png \9osc_log2.png \
bigverb.org+8−3
@@ -763,9 +763,12 @@ Calculate interpolation. Using the coefficents · 762 unmodified lines
763described above and the fractional component =f=, one can compute763described above and the fractional component =f=, one can compute
764cubic interpolation with the following expression:764cubic interpolation with the following expression:
765 765
766$$766@!(fig "bigverb_interpolation"
767``
767y(n) = (a x(n - 1) + b x(n) + c x(n + 1) + d x(n + 2)) \cdot f + x(n)768y(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_interpolation773#+NAME: compute_interpolation
771#+BEGIN_SRC c774#+BEGIN_SRC c
@@ -902,7 +905,9 @@ previous random value. · 130 unmodified lines
902The RNG algorithm used is quite simple, and is used to905The RNG algorithm used is quite simple, and is used to
903produce a 16-bit value.906produce 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
907Before and after this equation, the value is balanced so that912Before and after this equation, the value is balanced so that
908is a 16-bit bipolar signal.913is a 16-bit bipolar signal.
chaosnoise.org+8−6
@@ -239,12 +239,14 @@ sample gets computed. · 238 unmodified lines
239 239
240This uses the following difference equation:240This uses the following difference equation:
241 241
242$$242@!
243y(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!@
246Where $c$ is the chaos value, and $\gamma$ is a nonlinearity246
247set to be =0.05=.247Where @!(smallfig "chaosnoise_c" "c")!@ is the chaos value,
248and @!(smallfig "chaosnoise_gamma" "\\gamma")!@ is a
249nonlinearity set to be =0.05=.
248 250
249After the output value is computed, the coefficients are251After the output value is computed, the coefficients are
250updated.252updated.
fig.janet+16−0
@@ -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))
weewiki.janet+8−0
@@ -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))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t