Debian Codegraph @

texmf-dist/doc/latex/lapdf/conic.tex

raw
1 \input preamble.tex
2
3 \def\bf{\textbf}
4 \def\it{\textit}
5 \def\tt{\texttt}
6
7 % ---------------------------------------------------------------------------
8 \begin{document}
9 \unitlength0.85cm
10
11 \begin{center}
12 {\Huge \bf{Drawing with \pdfTeX} \bigskip}
13 \end{center}
14
15 Now you can draw arbitrary lines, polygons, integral and rational bezier
16 curves up to a degree of seven within your \pdfTeX{} document. The \Lapdf{}
17 style allows to draw directly with PDF, without any other files. You can
18 scale your drawing and use drawing primitives that look and function like
19 corresponding postscript commands. You can use PDF drawing primitives and
20 also \LaTeX{} typesetting of text in the same environment.
21
22 \begin{center}
23 \begin{lapdf}(18,18)(-9,-6)
24 \Red
25 \Rcurve(64)(-8,0,1)(2,12,3)(8,0,1) \Stroke
26 \Green
27 \Rcurve(64)(-8,0,1)(2,12,1)(8,0,1) \Stroke
28 \Blue
29 \Rcurve(64)(-8,0,3)(2,12,1)(8,0,3) \Gfill(0.9)
30 \Dgray
31 \Rcurve(64)(-8,0,1)(2,12,0)(8,0,1) \Stroke
32 \Magenta
33 \Rcurve(64)(-8,0,3)(2,12,-1)(8,0,3) \Gfill(0.9)
34 \Dash(1)
35 \Setwidth(0.01)
36 \Black
37 \Polygon(-8,0)(2,12)(8,0) \Stroke
38 \Line(-1,-6)(2,12) \Stroke
39 \Dash(0)
40 \Point(0)(-8,0)
41 \Point(0)(2,12)
42 \Point(0)(8,0)
43 \Point(1)(1.5,9)
44 \Point(1)(1,6)
45 \Point(1)(0.5,3)
46 \Point(1)(0,0)
47 \Point(1)(-1,-6)
48 \Text(-8.0,0.2,br){$P_0$}
49 \Text(2,12.2,bc){$P_1$}
50 \Text(8.0,0.2,bl){$P_2$}
51 \Text(-0.8,-5.8,bl){$-1/3$}
52 \Text(0.2,0.2,bl){$w=0$}
53 \Text(0.7,3.2,bl){$1/3$}
54 \Text(1.2,6.2,bl){$1$}
55 \Text(1.7,9.2,bl){$3$}
56 \end{lapdf}
57
58 \it{Various conic arcs defined by $w=(3,1,1/3,0,-1/3)$}.
59 \end{center}
60
61 This file shows some capabilities of the \Lapdf{} style. Rational quadratic
62 bezier curves can form all conic curves. These enable you to exactly draw any
63 parabolas, hyperbolas, ellipses and circles.
64
65 The above curves share the same control points, the only difference are the
66 curve's weights, which control the curve shape. \Lapdf{} has commands like
67 \it{Stroke, Fill, Setcol} and many others and it supports color.
68 \end{document}