summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lapdf/curveto.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/lapdf/curveto.tex')
-rw-r--r--macros/latex/contrib/lapdf/curveto.tex75
1 files changed, 75 insertions, 0 deletions
diff --git a/macros/latex/contrib/lapdf/curveto.tex b/macros/latex/contrib/lapdf/curveto.tex
new file mode 100644
index 0000000000..f1f9bd032a
--- /dev/null
+++ b/macros/latex/contrib/lapdf/curveto.tex
@@ -0,0 +1,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}