-
Notifications
You must be signed in to change notification settings - Fork 0
/
alg25-transform.tex
124 lines (119 loc) · 3.34 KB
/
alg25-transform.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BASED ON Hodge-King IBL week1day2 "Transformation Matching"
% DIRECTIONS: typeset twice to get positioning right
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[letterpaper,10pt]{article}
\usepackage{xintexpr} % for \xintthefloatexpr
\usepackage{pgfplots, amsmath, amssymb, ifthen}
\pgfplotsset{compat=1.13}
\thispagestyle{empty}
\pagestyle{empty}
\newcounter{card}
\newcommand\card[2]{
% page break every 15 cards
\ifthenelse{\equal{\arabic{card}}{15}}{\newpage\setcounter{card}0}{}
\begin{tikzpicture}[remember picture, overlay]
% position card 5 to a column, 3 columns
\draw (current page.north west)
++({(floor(mod(\arabic{card},15)/5)+1/2)*1/3*8.5in}, {(mod(\arabic{card},5)+1/2)*-1/5*11in})
coordinate (center);
\draw (center) node {#2};
% #1 = card ID number/letter
\draw (center) ++(1/2*1/3*8.5in - 0.2in, 0.2in - 1/2*1/5*11in)
node[fill=white] [anchor=south east] {{\boldmath\large\color{black}$#1$}};
% cut guides
\foreach \x/\y in {1/1, 1/-1, -1/1, -1/-1}
\draw[gray] (center) ++(\x*1/2*1/3*8.5in, \y*1/2*1/5*11in)
edge[-] ++(left:5mm)
edge[-] ++(right:5mm)
edge[-] ++(up:5mm)
edge[-] ++(down:5mm);
\end{tikzpicture}
\stepcounter{card}
}
\newcommand\cardf[2]{\card{#1}{\scalebox{1.85}{\LARGE$#2$}}}
\newcommand\carda[3]{\card{#1}{
\begin{tikzpicture}
\begin{axis}[
width=3.2in, height=2.35in,
axis equal image=false,
grid=major, axis lines=center,
domain=-3:3,
xmin=-3.1, xmax=3.1, xtick={-3,...,3},
xticklabel style={font=\Large},
ymin=-2.5, ymax=2.5, ytick={-2,...,2},
yticklabel style={font=\Large},
major tick length={0},
samples=299,
#3 % = graph options, eg, xmax, ytick
]
\addplot[ultra thick, smooth] {#2}; % = function
\end{axis}
\end{tikzpicture}
}}
\newcommand\cardb[2]{\carda{#1}{#2}{restrict y to domain=-2.5:2.5,}}
\newcommand\cardc[2]{\carda{#1}{#2}{
xmin=-6.3, xmax=6.3, xtick={-6.28319,-3.14159,3.14159, 6.28319},
xticklabels={$2\pi$, $-\pi$, $\pi$, $2\pi$},
ymin=-2.25, ymax=2.25, ytick={-2,-1,1,2},
domain=-6.2:6.2
}}
\newcommand\cardd[4]{\carda{#1}{#2}{
domain=0.005:15*#3,
xmin=-0.5*#3, xmax=15*#3,
xtick/.expanded={\xintthefloatexpr seq(x*#3, x={1,10})\relax},
xticklabel style={xshift=2ex},
ymin=-1.25*#4, ymax=1.25*#4, ytick={0, #4},
width=3.1in,
}}
\begin{document}
\cardf \epsilon{h(x)}
\cardf \mu{h(x+1)}
\cardf \gamma{h(x)+1}
\cardf \alpha{h(-x)}
\cardf \sigma{-h(x)}
\cardb D{x^2-2*x+1}
\cardb C{x^2}
\cardb M{x^2-2*x+2}
\cardb N{x^2+2*x+1}
\cardb E{-x^2+2*x-1}
\cardf {11}{x^2-2x+1}
\cardf {12}{x^2}
\cardf {13}{x^2-2x+2}
\cardf {14}{x^2+2x+1}
\cardf {15}{-x^2+2x-1}
\cardf \theta{f(x)}
\cardf \lambda{2f(x)}
\cardf \eta{f(2x)}
\cardf \beta{f(\frac12x)}
\cardf \zeta{\frac12f(x)}
\cardc L{cos(deg(x))}
\cardc I{2*cos(deg(x))}
\cardc A{cos(2*deg(x))}
\cardc F{cos(1/2*deg(x))}
\cardc B{1/2*cos(deg(x))}
\cardf 1{\cos x}
\cardf 2{2\cos x}
\cardf 3{\cos 2x}
\cardf 4{\cos \frac12x}
\cardf 5{\frac12\cos x}
\newcommand\mylog{\log}
%\newcommand\mylog{\scalebox{0.92}{$\log_{\!10}$}}
\cardf \rho{g(x)}
\cardf \delta{g(5x)}
\cardf \xi{g(\frac x5)}
\cardf \nu{5g(x)}
\cardf \pi{\frac{g(x)}5}
\cardd J{log10(x)}11
\cardd G{log10(5*x)}{1/5}1
\cardd K{log10(x/5)}51
\cardd H{5*log10(x)}15
\cardd O{1/5*log10(x)}1{0.2}
\cardf 6{\mylog x}
\cardf 7{\mylog x + \mylog5}
\cardf 8{\mylog x - \mylog5}
\cardf 9{\mylog x^5}
\cardf {10}{\mylog\sqrt[5]x}
\end{document}
\newpage
\section*{Solution}