summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lapdf/curveto.tex
blob: f1f9bd032abbe1272e928214a96594506b298cb6 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
\input preamble.tex

% ---------------------------------------------------------------------------
\begin{document}
\unitlength1.125cm

\begin{center}
{\Huge \bf{Integral Bezier Curves}}
\bigskip

\begin{lapdf}(16,16)(-8,-8)
 \Dgray
 \Rect(-8,-8,16,16) \Gfill(.9)
 \Black
 \Moveto(-8,-8)
 \Curveto(80)(8,8) \Stroke
 \Red
 \Moveto(-8,-8)
 \Curveto(80)(0,8)(8,-8) \Stroke
 \Green
 \Moveto(-8,-8)
 \Curveto(80)(-4,8)(4,-8)(8,8) \Stroke
 \Blue
 \Moveto(-8,-8)
 \Curveto(80)(-8,0)(12,-12)(0,8)(8,8) \Stroke
 \Cyan
 \Moveto(0,-8)
 \Curveto(96)(-8,-8)(-8,8)(8,8)(8,-8)(0,-8) \Stroke
 \Magenta
 \Moveto(-8,-8)
 \Curveto(96)(-8,-8)(0,-8)(-8,0)(0,8)(8,0)(0,-8)(8,-8) \Stroke
 \Yellow
 \Moveto(-8,0)
 \Curveto(96)(-5.715,8)(-3.43,-16)(-1.145,8)(1.145,-8)(3.43,16)
  (5.715,-8)(8,0) \Stroke
\end{lapdf}

\em{Curve-Degree: 1 black, 2 red, 3 green, 4 blue, 5 cyan, 6 magenta,
7 dyellow}
\end{center}

\newpage
\unitlength1cm

\begin{center}
{\Huge \bf{Rational Bezier Curves}}
\bigskip

\begin{lapdf}(18,18)(-9,-9)
 \Dgray
 \Rect(-9,-9,18,18) \Gfill(.9)
 \Red
 \Rmoveto(-9,9,1)
 \Rcurveto(80)(0,-9,4)(9,9,1) \Stroke
 \Green
 \Rmoveto(-9,-9,0.1)
 \Rcurveto(80)(-4.5,9,2.8)(4.5,-9,2.8)(9,9,0.1) \Stroke
 \Blue
 \Rmoveto(-9,9,0.1)
 \Rcurveto(80)(-4.5,-9,0.7)(0,9,1)(4.5,-9,0.7)(9,9,0.1) \Stroke
 \Cyan
 \Rmoveto(3,0,3)
 \Rcurveto(96)(0,3,1)(-3,0,1)(0,-3,1)(3,0,3) \Stroke
 \Magenta
 \Rmoveto(4,0,1)
 \Rcurveto(96)(4,16,0.2)(-12,8,0.2)(-12,-8,0.2)(4,-16,0.2)(4,0,1)
  \Stroke
 \Yellow
 \Rmoveto(0,-9,1)
 \Rcurveto(96)(-9,-9,2)(-9,9,1)(9,9,1)(9,-9,2)(0,-9,1) \Stroke
\end{lapdf}

\em{Curve-Degree: 2 red, 3 green, 4 blue, 5 cyan, 6 magenta, 7 dyellow}
\end{center}
\end{document}