summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lapdf/rational.tex
blob: eae95a1764587b0ba48e6af32be4b55dddd5a3c2 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
\input preamble.tex

% ---------------------------------------------------------------------------
\begin{document}
\begin{center}
{\Huge \bf{Integral And Rational Bezier Curves}}
\bigskip

\begin{lapdf}(18,18)(-9,-9)
 \Setwidth(0.01)
 \Dash(1)
 \Polygon(+0,+9)(+9,+9)
  (+9,+3)(-9,-3)(+9,-9)
  (+0,-9)(-9,-9)(+9,-3)
  (-9,+3)(-9,+9)(+0,+9) \Stroke
 \Setwidth(0.02)
 \Dash(0)
 \Red
 \Curve(96)(+0,+9)(+9,+9)(+9,+3)(-9,-3)(+9,-9)(+0,-9)
 \Curve(96)(+0,+9)(-9,+9)(-9,+3)(+9,-3)(-9,-9)(+0,-9) \Stroke
 \Blue
 \Rcurve(128)(+0,+9,1)(+9,+9,6)(+9,+3,1)(-9,-3,6)(+9,-9,6)(+0,-9,1)
 \Rcurve(128)(+0,+9,1)(-9,+9,6)(-9,+3,1)(+9,-3,6)(-9,-9,6)(+0,-9,1) \Stroke
 \Black
 \Point(0)(+0,+9)
 \Point(1)(+9,+9)
 \Point(1)(+9,+3)
 \Point(1)(-9,-3)
 \Point(1)(+9,-9)
 \Point(0)(+0,-9)
 \Point(1)(-9,-9)
 \Point(1)(+9,-3)
 \Point(1)(-9,+3)
 \Point(1)(-9,+9)
 \Text(+0.0,+8.8,tc){$w=1$}
 \Text(+8.8,+8.8,tr){$w=6$}
 \Text(+8.8,+3.2,br){$w=1$}
 \Text(-8.8,-3.0,lc){$w=6$}
 \Text(+8.8,-8.8,br){$w=6$}
 \Text(+0.0,-8.8,bc){$w=1$}
 \Text(-8.8,-8.8,bl){$w=6$}
 \Text(+8.8,-3.0,rc){$w=6$}
 \Text(-8.8,+3.2,bl){$w=1$}
 \Text(-8.8,+8.8,tl){$w=6$}
\end{lapdf}
\end{center}

Both curves are degree five bezier curves and they share the same
control points. The red one consists of two integral curves and the
blue one consists of two rational curves with diffent weights, which
are shown at their control points. Integral Bezier curves can be thought
as rational curves with all weights set to one.

As you can see, the curve is pulled towards the points, depending on
their weights. Thus you will have much more control over the curve
shape. Rational curves also allow to draw exact conics like ellipses,
circles, parabolas and hyperbolas.
\end{document}