summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-ode/examples
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-ode/examples')
-rw-r--r--Master/texmf-dist/doc/generic/pst-ode/examples/lorenz.tex50
-rw-r--r--Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex18
-rw-r--r--Master/texmf-dist/doc/generic/pst-ode/examples/particle.tex55
3 files changed, 123 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-ode/examples/lorenz.tex b/Master/texmf-dist/doc/generic/pst-ode/examples/lorenz.tex
new file mode 100644
index 00000000000..207c5cea4dc
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-ode/examples/lorenz.tex
@@ -0,0 +1,50 @@
+\documentclass{article}
+\usepackage{pst-ode,pst-3dplot}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}%
+
+\begin{document}
+\begin{center}
+\pstVerb{
+ /alpha 10 def
+ /beta 28 def
+ /gamma 8 3 div def
+}%
+\pstODEsolve[
+ algebraic,
+% saveData % enabling this writes table of results in file lorenzXYZ.data
+ % requires ps2pdf -dNOSAFER
+]{lorenzXYZ}{0 1 2}{0}{25}{2501}{10 10 30}{
+ alpha*(x[1]-x[0]) |
+ x[0]*(beta-x[2]) - x[1] |
+ x[0]*x[1] - gamma*x[2]
+}
+\fbox{\begin{pspicture}(-6,-2)(6,10)
+\psset{unit=0.17cm,Alpha=45,Beta=15}
+\listplotThreeD{lorenzXYZ}
+\psset{unit=0.425cm,linestyle=dashed}
+\pstThreeDNode(0,0,0){O}
+\pstThreeDNode(0,0,5){Z}
+\pstThreeDNode(5,0,0){X}
+\pstThreeDNode(0,5,0){Y}
+\pstThreeDNode(-10,-10,0){A}
+\pstThreeDNode(-10,-10,20){B}
+\pstThreeDNode(-10,10,20){C}
+\pstThreeDNode(-10,10,0){D}
+\pstThreeDNode(10,-10,0){E}
+\pstThreeDNode(10,-10,20){F}
+\pstThreeDNode(10,10,20){G}
+\pstThreeDNode(10,10,0){H}
+\pspolygon(A)(B)(C)(D)
+\pspolygon(E)(F)(G)(H)
+\psline(A)(E)
+\psline(B)(F)
+\psline(D)(H)
+\psline(C)(G)
+\psset{linestyle=solid,linecolor=red}
+\psline{->}(O)(X)
+\psline{->}(O)(Y)
+\psline{->}(O)(Z)
+\end{pspicture}}
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex b/Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex
new file mode 100644
index 00000000000..fdf6b670e07
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex
@@ -0,0 +1,18 @@
+\documentclass{article}
+\usepackage{pst-ode,pst-plot}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}%
+
+\begin{document}
+\begin{center}
+\psset{unit=3cm}
+\begin{pspicture}(-0.3,-0.4)(.2,1)
+ \psset{xAxisLabel=$t$,xAxisLabelPos={c,-6ex},yAxisLabelPos={-3ex,c}}
+ \begin{psgraph}[axesstyle=frame,Ox=-1,](0,0)(0,0)(4,1){10cm}{2.5cm}
+ \rput(1,0){\psplot[algebraic]{-1}{3}{Euler^(-x^2)}}
+ \pstODEsolve[algebraicIC,algebraic]{TY}{(t) 0}{-1}{3}{5}{1/Euler}{-2*t*y[0]}
+ \rput(1,0){\listplot[plotstyle=dots,dotsize=0.05,linecolor=red]{TY}}
+ \end{psgraph}
+\end{pspicture}
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/generic/pst-ode/examples/particle.tex b/Master/texmf-dist/doc/generic/pst-ode/examples/particle.tex
new file mode 100644
index 00000000000..b1010b08c32
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-ode/examples/particle.tex
@@ -0,0 +1,55 @@
+\documentclass{article}
+\usepackage{pst-ode,pst-3dplot}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}%
+
+\begin{document}
+\begin{center}
+\psset{unit=0.74cm,Alpha=40,Beta=20}
+\begin{pspicture}(-10,-2)(6,13)
+\newpsstyle{vecteurA}{arrowinset=0.1,arrowsize=0.15,linecolor={[rgb]{0 0.5 1}}}
+\pstVerb{
+ /wc 5 def
+ /tau 5 def
+ /vx 20 def
+ /vz 2 def
+}
+\pstODEsolve[algebraic]{particleXYZ}{0 1 2}{0}{25}{1000}{0 0 0 vx 0 vz}{
+ y[3] | y[4] | y[5] | wc*y[4] - y[3]/tau | -wc*y[3] - y[4]/tau | -y[5]/tau
+}
+\listplotThreeD{particleXYZ}
+\pstThreeDNode(0,0,0){O}
+\pstThreeDNode(0,0,1){Z}
+\pstThreeDNode(1,0,0){X}
+\pstThreeDNode(0,1,0){Y}
+\pstThreeDNode(-5,-9,0){A}
+\pstThreeDNode(-5,-9,10){B}
+\pstThreeDNode(-5,2,10){C}
+\pstThreeDNode(-5,2,0){D}
+\pstThreeDNode(5,-9,0){E}
+\pstThreeDNode(5,-9,10){F}
+\pstThreeDNode(5,2,10){G}
+\pstThreeDNode(5,2,0){H}
+\pstThreeDNode(0,0,0){M0}
+\pstThreeDNode(vx 5 div,0,vz 5 div){V}
+\pstThreeDNode(vx 5 div,0,0){Vx}
+{\psset{linestyle=dashed}
+\pspolygon(A)(B)(C)(D)
+\pspolygon(E)(F)(G)(H)
+\psline(A)(E)
+\psline(B)(F)
+\psline(D)(H)
+\psline(C)(G)}%
+\psline[linecolor=red]{->}(M0)(V)
+\psline[linecolor=cyan]{->}(M0)(Vx)
+\uput{0.1}[l](V){\red$\overrightarrow{v}_0$}
+{\psset{linestyle=solid,linecolor=red}
+\psline[style=vecteurA]{->}(O)(X)
+\psline[style=vecteurA]{->}(O)(Y)
+\psline[style=vecteurA]{->}(O)(Z)}%
+\uput[u](Z){$z$}
+\uput[dl](X){$x$}
+\uput[r](Y){$y$}
+\end{pspicture}
+\end{center}
+\end{document}