ex-2: change image 2-gamma-area.png from png to tikz
This commit is contained in:
parent
b48c227437
commit
ccb2c4be54
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@ -24,9 +24,37 @@ known methods involve sums, subtractions or products of very big or small
|
||||
numbers, packed in series, partial sums or infinite products. Thus, the
|
||||
efficiency of the methods lies on how quickly they converge to their limit.
|
||||
|
||||
![The area of the blue region converges to the Euler–Mascheroni
|
||||
constant.](images/2-gamma-area.png){#fig:gamma width=7cm}
|
||||
|
||||
\begin{figure}
|
||||
\hypertarget{fig:gamma}{%
|
||||
\centering
|
||||
\begin{tikzpicture}[yscale=3]
|
||||
\definecolor{brick}{RGB}{160, 54, 35}
|
||||
% Series
|
||||
\draw [fill=brick, brick] (1,0) rectangle (2,1);
|
||||
\draw [fill=brick, brick] (2,0) rectangle (3,0.5);
|
||||
\draw [fill=brick, brick] (3,0) rectangle (4,0.333);
|
||||
\draw [fill=brick, brick] (4,0) rectangle (5,0.25);
|
||||
\draw [fill=brick, brick] (5,0) rectangle (6,0.2);
|
||||
\draw [fill=brick, brick] (6,0) rectangle (7,0.167);
|
||||
\draw [fill=brick, brick] (7,0) rectangle (7.5,0.143);
|
||||
% Logarithm
|
||||
\filldraw [brick!40!white, domain=1:7.5, variable=\x]
|
||||
(1,0) -- plot({\x},{1/\x}) -- (7.5,0) -- cycle;
|
||||
% Axis
|
||||
\draw [thick, ->] (1,0) -- (1,1.2);
|
||||
\draw [thick, ->] (0.5,0) -- (7.5,0);
|
||||
\draw (1.0,-0.05) -- (1.0,0.05); \node [below, scale=0.7] at (1.0,-0.05) {1};
|
||||
\draw (2.0,-0.05) -- (2.0,0.05); \node [below, scale=0.7] at (2.0,-0.05) {2};
|
||||
\draw (3.0,-0.05) -- (3.0,0.05); \node [below, scale=0.7] at (3.0,-0.05) {3};
|
||||
\draw (4.0,-0.05) -- (4.0,0.05); \node [below, scale=0.7] at (4.0,-0.05) {4};
|
||||
\draw (5.0,-0.05) -- (5.0,0.05); \node [below, scale=0.7] at (5.0,-0.05) {5};
|
||||
\draw (6.0,-0.05) -- (6.0,0.05); \node [below, scale=0.7] at (6.0,-0.05) {6};
|
||||
\draw (7.0,-0.05) -- (7.0,0.05); \node [below, scale=0.7] at (7.0,-0.05) {7};
|
||||
\end{tikzpicture}
|
||||
\caption{The area of the red region converges to the Euler–Mascheroni
|
||||
constant..}\label{fig:gamma}
|
||||
}
|
||||
\end{figure}
|
||||
|
||||
## Computing the constant
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user