summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/4-2-17.mp
blob: f57df2d124e059ce8fcd7de980c34b829faf52db (plain)
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
% --- start of displayed preamble in the book ---

verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex
input graph
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
draw begingraph(2.5in,1.75in);
pickup pencircle scaled 1pt;
path p;
for x=-20 step 0.1 until 20:
  augment.p (x, x/(2+sind(x*180/3.14159)));
endfor;
glabel.lrt(btex $\displaystyle
                 \frac{x}{2+\sin(x)}$ etex,
           (-20,20));
gdraw p;
endgraph;
endfig;
end;