summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lapdf/fplot.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/lapdf/fplot.tex')
-rw-r--r--macros/latex/contrib/lapdf/fplot.tex271
1 files changed, 271 insertions, 0 deletions
diff --git a/macros/latex/contrib/lapdf/fplot.tex b/macros/latex/contrib/lapdf/fplot.tex
new file mode 100644
index 0000000000..a1bbaf03ad
--- /dev/null
+++ b/macros/latex/contrib/lapdf/fplot.tex
@@ -0,0 +1,271 @@
+\input preamble.tex
+
+\newdimen\x
+\newdimen\y
+
+% ---------------------------------------------------------------------------
+\begin{document}
+\begin{center}
+{\huge \bf{Trigonometric Functions}}
+\bigskip
+
+\begin{lapdf}(12,10.3)(-6,-5)
+ \Lingrid(10)(1,3)(-6,6)(-5,5)
+ \Red
+ \def\Fx(#1,#2){\Sin(#1,#2)}
+ \Fplot(50)(-6,6) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Cos(#1,#2)}
+ \Fplot(50)(-6,6) \Stroke
+ \Blue
+ \def\Fx(#1,#2){\Tan(#1,#2)}
+ \Fplot(50)(-6,-4.91) \Stroke
+ \Fplot(50)(-4.515,-1.768) \Stroke
+ \Fplot(50)(-1.373,1.373) \Stroke
+ \Fplot(50)(1.768,4.515) \Stroke
+ \Fplot(50)(4.91,6) \Stroke
+\end{lapdf}
+\bigskip
+
+{\huge \bf{Arcus Functions}}
+
+\begin{lapdf}(12,7.3)(-6,-3)
+ \Lingrid(10)(1,3)(-6,6)(-3,4)
+ \Red
+ \def\Fx(#1,#2){\Asin(#1,#2)}
+ \Fplot(50)(-1,1) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Acos(#1,#2)}
+ \Fplot(50)(-1,1) \Stroke
+ \Blue
+ \def\Fx(#1,#2){\Atan(#1,#2)}
+ \Fplot(50)(-6,6) \Stroke
+\end{lapdf}
+
+\newpage
+
+{\huge \bf{Hyperbolic Functions}}
+
+\begin{lapdf}(12,10.3)(-6,-5)
+ \Lingrid(10)(1,3)(-6,6)(-5,5)
+ \Red
+ \def\Fx(#1,#2){\Sinh(#1,#2)}
+ \Fplot(50)(-2.31,2.31) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Cosh(#1,#2)}
+ \Fplot(50)(-2.3,2.3) \Stroke
+ \Blue
+ \def\Fx(#1,#2){\Tanh(#1,#2)}
+ \Fplot(50)(-6,6) \Stroke
+\end{lapdf}
+\bigskip
+
+{\huge \bf{Area Functions}}
+
+\begin{lapdf}(12,10.3)(-6,-5)
+ \Lingrid(10)(1,3)(-6,6)(-5,5)
+ \Red
+ \def\Fx(#1,#2){\Asinh(#1,#2)}
+ \Fplot(50)(-6,6) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Acosh(#1,#2)}
+ \Fplot(80)(1,6) \Stroke
+ \def\Fx(#1,#2){\Acosh(#1,#2) #2=-#2}
+ \Fplot(80)(1,6) \Stroke
+ \Blue
+ \def\Fx(#1,#2){\Atanh(#1,#2)}
+ \Fplot(80)(-1,1) \Stroke
+\end{lapdf}
+
+\newpage
+
+{\huge \bf{Log and Exponential Functions}}
+
+\begin{lapdf}(10,10.3)(-3,-3)
+ \Lingrid(10)(1,3)(-3,7)(-3,7)
+ \Red
+ \def\Fx(#1,#2){\Ln(#1,#2)}
+ \Fplot(80)(0.05,7) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Log(1.5,#1,#2)}
+ \Fplot(80)(0.3,7) \Stroke
+ \Blue
+ \def\Fx(#1,#2){\Exp(#1,#2)}
+ \Fplot(50)(-3,1.946) \Stroke
+ \Cyan
+ \def\Fx(#1,#2){\Pow(1.5,#1,#2)}
+ \Fplot(50)(-3,4.8) \Stroke
+\end{lapdf}
+\bigskip
+
+{\huge \bf{Square and Square Root Functions}}
+
+\begin{lapdf}(10,10.3)(-3,-3)
+ \Lingrid(10)(1,3)(-3,7)(-3,7)
+ \Red
+ \def\Fx(#1,#2){\Dset(\x,#1) \Dmul(\x,\x) #2=\x}
+ \Fplot(100)(-2.64,2.64) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Sqrt(#1,#2)}
+ \Fplot(100)(0,7) \Stroke
+ \def\Fx(#1,#2){\Sqrt(#1,#2) #2=-#2}
+ \Fplot(100)(0,7) \Stroke
+\end{lapdf}
+
+\newpage
+
+{\huge \bf{Power and Root Functions}}
+\bigskip
+
+\begin{lapdf}(18,22)(0,0)
+ \Lingrid(10)(1,3)(0,18)(0,22)
+ \Rect(0,0,18,22)
+ \Setclip
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,1.0,#2)}
+ \Fplot(100)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,1.1,#2)}
+ \Fplot(100)(0,16.6) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,1.2,#2)}
+ \Fplot(100)(0,13.2) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,1.3,#2)}
+ \Fplot(100)(0,10.8) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,1.4,#2)}
+ \Fplot(100)(0,9.2) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,1.5,#2)}
+ \Fplot(100)(0,7.9) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,1.7,#2)}
+ \Fplot(100)(0,6.3) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,2.0,#2)}
+ \Fplot(100)(0,4.8) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,2.5,#2)}
+ \Fplot(100)(0,3.5) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,3.0,#2)}
+ \Fplot(50)(0,2.8) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,3.5,#2)}
+ \Fplot(30)(0,2.45) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Pow(#1,4.0,#2)}
+ \Fplot(23)(0,2.2) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,1.1,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,1.2,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,1.3,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,1.4,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,1.5,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,1.7,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,2.0,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,2.5,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,3.0,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,3.5,#2)}
+ \Fplot(300)(0,18) \Stroke
+ \Stepcol(0,23,2)
+ \def\Fx(#1,#2){\Root(#1,4.0,#2)}
+ \Fplot(300)(0,18) \Stroke
+\end{lapdf}
+
+\newpage
+
+{\huge \bf{Hyperbolas}}
+
+\begin{lapdf}(10,10.3)(-5,-5)
+ \Lingrid(10)(1,3)(-5,5)(-5,5)
+ \Red
+ \def\Fx(#1,#2){\Dset(\x,#1) \Dset(\y,1) \Ddiv(\y,\x) #2=\y}
+ \Fplot(50)(-5,-0.2) \Stroke
+ \Fplot(50)(0.2,5) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Dset(\x,#1) \Dmul(\x,\x) \Dset(\y,1) \Ddiv(\y,\x) #2=\y}
+ \Fplot(50)(-5,-0.447) \Stroke
+ \Fplot(50)(0.447,5) \Stroke
+\end{lapdf}
+\bigskip
+
+{\huge \bf{Other Functions}}
+
+\begin{lapdf}(10,10.3)(-5,-5)
+ \Lingrid(10)(1,3)(-5,5)(-5,5)
+ \Red
+ \def\Fx(#1,#2){\Dset(\x,#1) \y=\x \x=2.5\x \Sin(\Np\x,#2) \Ddiv(#2,\y) #2=2#2}
+ \Fplot(100)(-5,5) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Dset(\x,#1) \Dmul(\x,\x) \Dadd(\x,1) \Dset(\y,5) \Ddiv(\y,\x) #2=\y}
+ \Fplot(100)(-5,5) \Stroke
+ \Blue
+ \def\Fx(#1,#2){\Dset(\x,#1) \y=9\x \Dmul(\x,\x) \Dadd(\x,1) \Ddiv(\y,\x) #2=\y}
+ \Fplot(100)(-5,5) \Stroke
+\end{lapdf}
+
+\newpage
+
+{\huge \bf{Damped Oszillator}}
+
+\begin{lapdf}(14,11.3)(-2,-5)
+ \Lingrid(10)(1,3)(-2,12)(-5,6)
+ \Red
+ \def\Fx(#1,#2){\Dset(#2,#1) #2=3#2 \Sin(\Np#2,#2)\Dset(\x,#1) \x=-0.2\x \Exp(\Np\x,\x) \Dmul(#2,\x) #2=4#2}
+ \Fplot(300)(-2,12) \Stroke
+ \Dgray
+ \Dash(1)
+ \def\Fx(#1,#2){\Dset(#2,#1) #2=-0.2#2 \Exp(\Np#2,#2) #2=4#2}
+ \Fplot(50)(-1.6,12) \Stroke
+ \def\Fx(#1,#2){\Dset(#2,#1) #2=-0.2#2 \Exp(\Np#2,#2) #2=-4#2}
+ \Fplot(50)(-0.6,12) \Stroke
+\end{lapdf}
+\bigskip
+
+{\huge \bf{Function, Derivatives \& Asymptotes}}
+
+\begin{lapdf}(12,10.3)(-5,-5)
+ \Lingrid(10)(1,3)(-5,7)(-5,5)
+ \Red
+ \def\Fx(#1,#2){\Dset(\x,#1) \Dsub(\x,2) \y=#1\x \Dsub(\y,3) \y=0.2\y \Dset(#2,1) \Ddiv(#2,\x) \Add(#2,\y)}
+ \Fplot(100)(-4.47,1.765) \Stroke
+ \Fplot(100)(2.18,6.28) \Stroke
+ \Green
+ \def\Fx(#1,#2){\Dset(#2,#1) \Dsub(#2,1) \x=#2 \Dsub(\x,1) \Dmul(\x,\x) #2=0.4#2 \Dset(\y,1) \Ddiv(\y,\x) \Sub(#2,\y)}
+ \Fplot(100)(-5,1.56) \Stroke
+ \Fplot(100)(2.422,7) \Stroke
+ \Blue
+ \def\Fx(#1,#2){\Dset(#2,2) \Dset(\x,#1) \Dsub(\x,2) \Pot(\Np\x,3,\x) \Ddiv(#2,\x) \Dadd(#2,0.4)}
+ \Fplot(100)(-5,1.282) \Stroke
+ \Fplot(100)(2.758,7) \Stroke
+ \Black
+ \Setwidth(0.01)
+ \def\Fx(#1,#2){\Dset(#2,#1) \Dadd(#2,1) \Dset(\x,#1) \Dsub(\x,3) \Dmul(#2,\x) #2=0.2#2}
+ \Fplot(100)(-4.4,6.43) \Stroke
+ \Dash(1)
+ \Line(2,-5)(2,5) \Stroke
+ \Line(-5,0.4)(7,0.4) \Stroke
+ \Line(-5,-2.4)(7,2.4) \Stroke
+\end{lapdf}
+\end{center}
+\end{document}