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+$$
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
_fig/bigverb_rng.tex+9−0
@@ -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
_fig/chaosnoise_c.tex+9−0
@@ -0,0 +1,9 @@
1+\hsize 0pt
2+\vsize 0pt
3+\nopagenumbers
4+\overfullrule 0pt
5+\noindent
6+$
7+c
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+$$
7+y(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 @@
11 FIGS=\
2+bigverb_interpolation.png \
3+bigverb_rng.png \
4+chaosnoise_c.png \
5+chaosnoise_eqn.png \
6+chaosnoise_gamma.png \
27 osc_lerp.png \
38 osc_lerp_simp.png \
49 osc_log2.png \
bigverb.org+8−3
@@ -763,9 +763,12 @@ Calculate interpolation. Using the coefficents · 762 unmodified lines
763763 described above and the fractional component =f=, one can compute
764764 cubic interpolation with the following expression:
765765
766−$$
766+@!(fig "bigverb_interpolation"
767+``
767768 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+!@
769772
770773 #+NAME: compute_interpolation
771774 #+BEGIN_SRC c
@@ -902,7 +905,9 @@ previous random value. · 130 unmodified lines
902905 The RNG algorithm used is quite simple, and is used to
903906 produce a 16-bit value.
904907
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+!@
906911
907912 Before and after this equation, the value is balanced so that
908913 is a 16-bit bipolar signal.
chaosnoise.org+8−6
@@ -239,12 +239,14 @@ sample gets computed. · 238 unmodified lines
239239
240240 This uses the following difference equation:
241241
242−$$
243−y(n) = | c y(n - 1) - y(n - 2) - \gamma |
244−$$
245−
246−Where $c$ is the chaos value, and $\gamma$ is a nonlinearity
247−set to be =0.05=.
242+@!
243+(fig "chaosnoise_eqn"
244+``y(n) = | c y(n - 1) - y(n - 2) - \gamma |``)
245+!@
246+
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=.
248250
249251 After the output value is computed, the coefficients are
250252 updated.
fig.janet+16−0
@@ -13,3 +13,19 @@ · 12 unmodified lines
1313 (file/write fp eqn)
1414 (file/write fp "\n$$\n\\bye")
1515 (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
9797 (string "/" fig-dir "/" name ".png")
9898 (string webroot "/" fig-dir "/" name ".png"))
9999 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