| 1 |
.PS |
| 2 |
# Asymptotes.m4 |
| 3 |
# https://tex.stackexchange.com/questions/706340/create-an-asymptotes-summary-diagram-for-a-function |
| 4 |
gen_init |
| 5 |
|
| 6 |
definergbcolor(armygreen,0.29,0.33,0.13) |
| 7 |
definergbcolor(vlightgray,0.95,0.95,0.95) |
| 8 |
boxrad = 7bp__ |
| 9 |
|
| 10 |
define(`greenbox',`box wid 90bp__ \ |
| 11 |
outlined "armygreen!90" shaded "armygreen!90" \ |
| 12 |
"{\color{white} `$1'}" ') |
| 13 |
|
| 14 |
define(`graybox',`box thick 0.4 outlined "gray" shaded "vlightgray" \ |
| 15 |
`$1'') |
| 16 |
|
| 17 |
changequote(,) command "\newcommand{\eace}{\'e} |
| 18 |
\newcommand{\squote}{\char39} |
| 19 |
\newcommand{\dequation}{d'\'equation}" |
| 20 |
changequote(`,) |
| 21 |
|
| 22 |
foreach_(`txt',`L`'m4Lx: graybox(wid 72bp__ ht 130 bp__ \ |
| 23 |
"\parbox{72bp}{\begin{centering} |
| 24 |
{\sf txt \\ \vfill\vbox{}} |
| 25 |
\end{centering}}") |
| 26 |
ifelse(m4Lx,6,,`move 10bp__')', |
| 27 |
|
| 28 |
`$(C_f)$ admet\\ Une asymptote\\ horizontale\\ \dequation:\\ |
| 29 |
$y = a$\\ au voisinage\\ de $\infty$', |
| 30 |
|
| 31 |
`$(C_f)$ admet\\ Une asymptote\\ oblique\\ \dequation:\\ |
| 32 |
$y = ax+b$\\ au voisinage\\ de $\infty$', |
| 33 |
|
| 34 |
`\hbox{}\vspace*{0.5\baselineskip} |
| 35 |
$(C_f)$ admet\\ Une branche\\ parabolique\\ de direction\\ |
| 36 |
la droite\\ \dequation:\\ |
| 37 |
$y = ax$\\ au voisinage\\ de $\infty$', |
| 38 |
|
| 39 |
`$(C_f)$ admet\\ Une branche\\ parabolique\\ de direction\\ |
| 40 |
l\squote{}axe des\\ ordonn\eace{}s\\ au voisinage\\ de $\infty$', |
| 41 |
|
| 42 |
`$(C_f)$ admet\\ Une branche\\ parabolique\\ de direction\\ |
| 43 |
l\squote{}axe des\\ abscisses\\ au voisinage\\ de $\infty$', |
| 44 |
|
| 45 |
`\vspace*{1ex}$(C_f)$ admet\\ Une \\ asymptote\\ verticale\\ |
| 46 |
\dequation:\\[1ex] |
| 47 |
$x = a$\\ \hbox{}\hfill\hbox{}') |
| 48 |
|
| 49 |
M: [ M1: graybox(wid 105bp__ \ |
| 50 |
"$\lim\limits_{x\rightarrow\infty} [f(x)-ax] = b$") |
| 51 |
move 3bp__ |
| 52 |
M2: graybox(wid 105bp__ \ |
| 53 |
"$\lim\limits_{x\rightarrow\infty} [f(x)-ax] = \infty$") |
| 54 |
] with .s at ((L2.x+L4.x)/2,L2.n.y+boxht) |
| 55 |
|
| 56 |
U:[ foreach_(`txt',`U`'m4Lx:graybox(wid 100bp__ ifelse(m4Lx,1,`+20bp__') "txt") |
| 57 |
ifelse(m4Lx,4,,`move 2bp__')', |
| 58 |
`$\lim\limits_{x\rightarrow\infty} [f(x)-(ax{+}b)] = 0$', |
| 59 |
`\(\lim\limits_{x\rightarrow\infty} \frac{f(x)}{x} = |
| 60 |
\raisebox{-0.5ex}{$a \atop {(a \neq 0)}$}\)', |
| 61 |
`\(\lim\limits_{x\rightarrow\infty} \frac{f(x)}{x} = \infty \)', |
| 62 |
`\(\lim\limits_{x\rightarrow\infty} \frac{f(x)}{x} = 0 \)') |
| 63 |
] with .s at ((L1.x+L6.x)/2,M.n.y+boxht) |
| 64 |
|
| 65 |
T1: greenbox($\lim\limits_{x\rightarrow\infty} f(x) = a$) \ |
| 66 |
with .s at (L1.x,U.n.y+boxht) |
| 67 |
T2: greenbox($\lim\limits_{x\rightarrow\infty} f(x) = \infty$) \ |
| 68 |
with .s at ((L1.x+L6.x)/2,T1.s.y) |
| 69 |
T3: greenbox($\lim\limits_{x\rightarrow a} f(x) = \infty$) \ |
| 70 |
with .e at (L6.e.x,T2.y) |
| 71 |
|
| 72 |
linethick_(1) |
| 73 |
arrow from (U.w.x-5bp__,T1.s.y) down T1.s.y-L1.n.y |
| 74 |
A: (T2.w.x,T2.s.y+boxrad); B1: U.U1.n+(boxht,0) |
| 75 |
move to A; arcto((B1,A),B1,boxrad*3/2); arrow to B1 |
| 76 |
A: (U.U3.w.x+boxrad,T2.s.y); arrow from A to (A,U.U3.n) |
| 77 |
B2: (1/2 between M.M1.e and M.M2.w,U.U2.n) |
| 78 |
line from A+(-5bp__,0) down_ 10bp__ then left 10bp__ |
| 79 |
arcto((B2,Here),B2,boxrad*3/2); arrow to B2 |
| 80 |
B3: (L5.e.x-2*boxrad,U.U4.n.y) |
| 81 |
line from A+( 5bp__,0) down_ 10bp__ then right_ 10 bp__ |
| 82 |
arcto((B3,Here),B3,boxrad*3/2); arrow to B3 |
| 83 |
arrow from (B3,U.U4.s) to (B3,L5.n) |
| 84 |
arrow from (U.U4.e.x+5bp__,T3.s.y) down T3.s.y-L6.n.y |
| 85 |
line from U.U2.s+(-5bp__,0) down_ 10bp__ then left_ 10bp__ |
| 86 |
arcto((M.M1.n,Here),M.M1.n,boxrad*3/2); arrow to M.M1.n |
| 87 |
arrow from (Here,M.M1.s) down M.M1.s.y-L2.n.y |
| 88 |
line from U.U2.s+( 5bp__,0) down_ 10bp__ then right_ 10bp__ |
| 89 |
arcto((M.M2.n,Here),M.M2.n,boxrad*3/2); arrow to M.M2.n |
| 90 |
arrow from (L3.e.x-boxrad*3/2,M.M2.s.y) down M.M2.s.y-L3.n.y |
| 91 |
arrow from (M.M2.e.x+5bp__,U.U3.s.y) down U.U3.s.y-L4.n.y |
| 92 |
arrow from (M.w.x-5bp__,U.U1.s.y) down U.U1.s.y-L2.n.y |
| 93 |
.PE |