Debian Codegraph @

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

raw
1 \input preamble.tex
2
3 % ---------------------------------------------------------------------------
4 \begin{document}
5 \begin{center}
6 {\Huge \bf{Integral And Rational Bezier Curves}}
7 \bigskip
8
9 \begin{lapdf}(18,18)(-9,-9)
10 \Setwidth(0.01)
11 \Dash(1)
12 \Polygon(+0,+9)(+9,+9)
13 (+9,+3)(-9,-3)(+9,-9)
14 (+0,-9)(-9,-9)(+9,-3)
15 (-9,+3)(-9,+9)(+0,+9) \Stroke
16 \Setwidth(0.02)
17 \Dash(0)
18 \Red
19 \Curve(96)(+0,+9)(+9,+9)(+9,+3)(-9,-3)(+9,-9)(+0,-9)
20 \Curve(96)(+0,+9)(-9,+9)(-9,+3)(+9,-3)(-9,-9)(+0,-9) \Stroke
21 \Blue
22 \Rcurve(128)(+0,+9,1)(+9,+9,6)(+9,+3,1)(-9,-3,6)(+9,-9,6)(+0,-9,1)
23 \Rcurve(128)(+0,+9,1)(-9,+9,6)(-9,+3,1)(+9,-3,6)(-9,-9,6)(+0,-9,1) \Stroke
24 \Black
25 \Point(0)(+0,+9)
26 \Point(1)(+9,+9)
27 \Point(1)(+9,+3)
28 \Point(1)(-9,-3)
29 \Point(1)(+9,-9)
30 \Point(0)(+0,-9)
31 \Point(1)(-9,-9)
32 \Point(1)(+9,-3)
33 \Point(1)(-9,+3)
34 \Point(1)(-9,+9)
35 \Text(+0.0,+8.8,tc){$w=1$}
36 \Text(+8.8,+8.8,tr){$w=6$}
37 \Text(+8.8,+3.2,br){$w=1$}
38 \Text(-8.8,-3.0,lc){$w=6$}
39 \Text(+8.8,-8.8,br){$w=6$}
40 \Text(+0.0,-8.8,bc){$w=1$}
41 \Text(-8.8,-8.8,bl){$w=6$}
42 \Text(+8.8,-3.0,rc){$w=6$}
43 \Text(-8.8,+3.2,bl){$w=1$}
44 \Text(-8.8,+8.8,tl){$w=6$}
45 \end{lapdf}
46 \end{center}
47
48 Both curves are degree five bezier curves and they share the same
49 control points. The red one consists of two integral curves and the
50 blue one consists of two rational curves with diffent weights, which
51 are shown at their control points. Integral Bezier curves can be thought
52 as rational curves with all weights set to one.
53
54 As you can see, the curve is pulled towards the points, depending on
55 their weights. Thus you will have much more control over the curve
56 shape. Rational curves also allow to draw exact conics like ellipses,
57 circles, parabolas and hyperbolas.
58 \end{document}