diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-vehicle/pst-vehicle-doc.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-vehicle/pst-vehicle-doc.tex | 220 |
1 files changed, 206 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-vehicle/pst-vehicle-doc.tex b/Master/texmf-dist/doc/generic/pst-vehicle/pst-vehicle-doc.tex index f8acf1e1f59..6a04bb3dfad 100644 --- a/Master/texmf-dist/doc/generic/pst-vehicle/pst-vehicle-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-vehicle/pst-vehicle-doc.tex @@ -34,6 +34,72 @@ \usepackage{pst-vehicle,pst-eucl,pstricks-add,animate} \let\belowcaptionskip\abovecaptionskip + +\usepackage{etex} % um die Anzahl der Register zu erh\"{o}hen (sonst nur 256) + + +\newcommand{\qrq}{\ensuremath{\quad \Rightarrow \quad}} +\newcommand{\envert}[1]{\left\lvert#1\right\rvert} +\let\abs=\envert +\newcommand{\BM}[1]{\ensuremath{\text{\boldmath $#1$\unboldmath}}} +\newcommand{\Anf}[1]{\glqq{}#1\grqq{}} + +\parindent0pt + +\makeatletter +\def\curveVal{\def\pst@par{}\pst@object{curveVal}}% +\def\curveVal@i#1#2{\@ifnextchar[% +{\curveVal@ii{#1}{#2}}% +{\curveVal@ii{#1}{#2}[1]}}% +\def\curveVal@ii#1#2[#3]{% +\pst@killglue% +\begingroup% +\use@par% +\begin@SpecialObj% +\pst@Verb{% + /Pi 3.1415926 def + /rpn {tx@AlgToPs begin AlgToPs end cvx} def + /x0 #1 def + /rW #3 def + /func (#2) rpn def + /Diff (Derive(1,#2)) rpn def + /DiffI (Derive(2,#2)) rpn def + /dAB (sqrt(1+Diff^2)) rpn def + /dABdiff (Derive(1,sqrt(1+(Derive(1,#2))^2))) rpn def + /x x0 def func /funcx0 exch def % ----- f(x0) + /x x0 def Diff /Diffx0 exch def % ----- f'(x0) + /x x0 def DiffI /DiffIx0 exch def % --- f''(x0) + /KWRho {DiffI 1 Diff dup mul add 3 exp sqrt div} def + /x x0 def KWRho /KWRhox0 exch def % --- f''(x0) + /tA 1 1 Diffx0 dup mul add sqrt div def % + /deltax0 tA Diffx0 mul neg KWRhox0 div def + /deltay0 tA KWRhox0 div def + /deltaxW tA Diffx0 mul neg rW mul def + /deltayW tA rW mul def + /Rho {1 KWRho div} def + /x x0 def Rho abs /Rhox0 exch def + /alpha deltax0 deltay0 atan def + /beta Diffx0 1 atan def + /tex beta cos def + /tey beta sin def + /gamma 90 beta add def + /nex gamma cos def + /ney gamma sin def +}% +\pnode(!x0 funcx0){PC}% +\pnode(!x0 deltaxW 2 mul add funcx0 deltayW 2 mul add){QC}% +\pnode(!x0 deltax0 add funcx0 deltay0 add){MC}% +\pnode(!x0 deltaxW add funcx0 deltayW add){MW}% +\showpointsfalse% +\end@SpecialObj% +\endgroup\ignorespaces% +}% +\makeatother +%3 \cdot f' \cdot (f'')^2 - (f')^2 \cdot f''' - f''' = 0 Stellen maximaler Kr\"{u}mmung! + +\psset{arrowlength=2.8,arrowinset=0.1} + + \def\bgImage{% \begin{pspicture}(0,0)(14,8) \def\FuncA{0.5*cos(1.5*x)+0.25*x} @@ -56,7 +122,7 @@ \begin{document} -\title{pst-vehicle v 1.0} +\title{pst-vehicle v 1.1} \subtitle{A PSTricks package for slipping/rolling vehicles on curves of any kind of mathematical functions} \author{Thomas \textsc{S\"{o}ll}\\ avec la collaboration de\\ @@ -418,27 +484,133 @@ The total angle $\gamma$ is: -\subsection{Rolling without slipping} +\subsection{Determination of the curvature radius} + +A curved curve can be imagined from many small circular arcs. The radius of the respective associated circles is referred to as the radius of curvature. The stronger the curvature of a curve changes, the smaller the intervals have to be chosen in order to be able to speak approximately of a circular arc. + +To find the radius of such an arc and thus the radius of the curvature of the curve at a point $x_{0}$, the normal in $ x_{0} $ should be intersected with the normal in $x_{0}+\epsilon$. This yields the $x$ value of the center of the curvature circle M of the curve. The following drawing is intended to illustrate this. + +\begin{pspicture}[showgrid=false,shift=0,saveNodeCoors,NodeCoorPrefix=n](0,-0.6)(18,9.2) +\def\funkg{0.4*(x-3)*sin(0.2*(x-5))} +\curveVal{5}{\funkg}[5] + +\psplot[algebraic=true,plotpoints=500,linecolor=black,linewidth=2pt,yMaxValue=25,yMinValue=-15]{0}{18}{\funkg} +%\psplot[algebraic=false,plotpoints=500,linecolor=red,linewidth=2pt,yMaxValue=25,yMinValue=-15]{0}{18}{Rho} +\pcline[linewidth=1.5pt,nodesepB=-2.6,linecolor=BrickRed](!x0 funcx0)(!x0 deltax0 add funcx0 deltay0 add) +\pcline[linewidth=1.5pt,nodesepB=-2.6,linecolor=Green](*{x0 0.5 add} {\funkg})(!x0 deltax0 add funcx0 deltay0 add) +\psdot[dotsize=5pt](!x0 funcx0) +\psdot[dotsize=5pt](*{x0 0.5 add} {\funkg}) +\psdot[dotsize=5pt](!x0 deltax0 add funcx0 deltay0 add) +\uput{0.25}[150]{0}(!x0 deltax0 add funcx0 deltay0 add){M} +\psarc[linewidth=1.5pt,linestyle=dashed,linecolor=cyan](!x0 deltax0 add funcx0 deltay0 add){!1 KWRhox0 div}{230}{380} +\pcline[offset=-30pt,tbarsize=20pt,linewidth=1.5pt,linecolor=BrickRed]{|<->|}(!x0 funcx0)(!x0 deltax0 add funcx0 deltay0 add) +\ncput*{\color{BrickRed}$\rho$} +%\pcline[offset=20pt,tbarsize=20pt,linewidth=1.5pt]{|<->|}(!x0 deltax0 add funcx0)(!x0 deltax0 add funcx0 deltay0 add) +%\ncput*{$\Delta y_{m}$} +\pcline[linecolor=orange,linewidth=1.2pt]{<->}(!x0 deltax0 add funcx0)(!x0 deltax0 add funcx0 deltay0 add) +\naput[nrot=:U]{\color{orange}$\Delta y_{m}$} +\pcline[linecolor=orange,linewidth=1.2pt]{<->}(!x0 deltax0 add funcx0)(!x0 funcx0) +\nbput[nrot=:U]{\color{orange}$\Delta x_{m}$} +\end{pspicture} -\textbf{Important note:} There is a limitation for the radii. The radii $r$ of the wheels of the vehicle need to be smaller than the minimal curvature radius $\varrho$ of the given curve. +\makebox[7cm][l]{\textbf{Normal in \BM{x_{0}}:}} $ n(x)=-\frac{1}{f'(x_{0})}\cdot (x-x_{0})+f(x_{0})$ -At points of inflection, the curvature radius is $\infty$. The curvature radius $\varrho$ is calculated with the following formula: +\makebox[7cm][l]{\textbf{Normal in \BM{x_{0}+\epsilon}:}} $ n_{\epsilon}(x)=-\frac{1}{f'(x_{0}+\epsilon)}\cdot (x-x_{0}-\epsilon)+f(x_{0}+\epsilon)$ + +\makebox[7cm][l]{\textbf{Intersection point of the normals:}} $n_{\epsilon}(x) - n(x) = 0$ +\begin{alignat*}{2} +- \frac{x}{f'(x_{0}+\epsilon)} + \frac{x_{0}}{f'(x_{0}+\epsilon)} + \frac{\epsilon}{f'(x_{0}+\epsilon)} + f(x_{0}+\epsilon) + \frac{x}{f'(x_{0})} - \frac{x_{0}}{f'(x_{0})} - f(x_{0}) & = 0&\qquad& \\[4pt] +\frac{x\cdot \left[f'(x_{0}+\epsilon) - f'(x_{0})\right]}{f'(x_{0}+\epsilon)\cdot f'(x_{0})} - \frac{x_{0}\cdot \left[f'(x_{0}+\epsilon) - f'(x_{0})\right]}{f'(x_{0}+\epsilon)\cdot f'(x_{0})} + \frac{\epsilon}{f'(x_{0}+\epsilon)} + f(x_{0}+\epsilon) - f(x_{0}) & = 0&\qquad& |:\epsilon\\[4pt] +\frac{x\cdot \frac{f'(x_{0}+\epsilon) - f'(x_{0})}{\epsilon}}{f'(x_{0}+\epsilon)\cdot f'(x_{0})} - \frac{x_{0}\cdot \frac{f'(x_{0}+\epsilon) - f'(x_{0})}{\epsilon}}{f'(x_{0}+\epsilon)\cdot f'(x_{0})} + \frac{1}{f'(x_{0}+\epsilon)} + \frac{f(x_{0}+\epsilon) - f(x_{0})}{\epsilon} & = 0&\qquad&| \lim_{\epsilon\to 0}\\[4pt] +\frac{x\cdot f''(x_{0})}{f'(x_{0})\cdot f'(x_{0})} - \frac{x_{0}\cdot f''(x_{0})}{f'(x_{0})\cdot f'(x_{0})} + \frac{1}{f'(x_{0})} + f'(x_{0}) & = 0&& +\end{alignat*} +Solving for $x$: +\begin{equation*} + x = x_{0} - \frac{f'(x_{0})}{f''(x_{0})} - \frac{\left[f'(x_{0})\right]^{3}}{f''(x_{0})} = x_{0} + \underbrace{\left[-\frac{f'(x_{0})}{f''(x_{0})}\cdot \left\{ 1 + \left[f'(x_{0})\right]^{2} \right\}\right]}_{\Delta x_{m}} +\end{equation*} +For the corresponding change $\Delta y_{m}$ of the ordinate $y$, we multiply the slope of the normal with $\Delta x_{m}$: +\begin{equation*} + \Delta y_{m} = -\frac{1}{f'(x_{0})} \cdot \Delta x_{m} =\frac{1}{f''(x_{0})}\cdot \left\{ 1 + \left[f'(x_{0})\right]^{2} \right\} +\end{equation*} +With the Pythagorean theorem we get for the curvature radius: \begin{equation*} -\varrho=\frac{\sqrt{(1+f'(x)^2)^3}}{f''(x)} + \rho = \sqrt{(\Delta x_{m})^{2} + (\Delta y_{m})^{2}} = \sqrt{(\Delta x_{m})^{2} + \left[-\frac{1}{f'(x_{0})} \cdot \Delta x_{m}\right]^{2}} = \abs{\frac{\Delta x_{m}}{f'(x_{0})}} \cdot \sqrt{\left[f'(x_{0})\right]^{2} + 1} \end{equation*} -The condition for \emph{rolling without slipping} is +Using $\Delta x_{m} = -\frac{f'(x_{0})}{f''(x_{0})}\cdot \left\{ 1 + \left[f'(x_{0})\right]^{2} \right\}$--- this leads to: \begin{equation*} -\omega=\left(\frac{1}{r}-\frac{1}{\varrho}\right)\cdot \dot{s}, + \rho = \abs{\frac{\frac{f'(x_{0})}{f''(x_{0})}\cdot \left\{ 1 + \left[f'(x_{0})\right]^{2} \right\}}{f'(x_{0})}} \cdot \sqrt{\left[f'(x_{0}\right]^{2} + 1} = + \frac{\sqrt{\left\{1 + \left[f'(x_{0})\right]^{2}\right\}^{3}}}{\abs{f''(x_{0})}} \end{equation*} -where $s$ is the length along the curve of the function $f$. -With + + +\subsection{Rolling without slipping} + +\begin{pspicture}[showgrid=false,shift=0,saveNodeCoors,NodeCoorPrefix=n](0,-0.8)(18,11) +\def\funkg{0.4*(x-3)*sin(0.2*(x-5))} +\curveVal{7}{\funkg}[3] +%\psplot[algebraic=true,plotpoints=500,linecolor=black,linewidth=2pt,yMaxValue=25,yMinValue=-15]{0}{18}{\funkg} +\pcline[linewidth=1.5pt,nodesepB=0,linecolor=BrickRed](PC)(MC) +\psdot[dotsize=5pt](MC) +\uput{0.2}[40]{0}(MC){M$_{\text{c}}$} +\psarc[linewidth=1.5pt,linecolor=cyan](MC){!Rhox0}{255}{340} +\psdot[dotsize=5pt](PC) +\uput{0.25}[-60]{0}(PC){P} +\uput{0.25}[60]{0}(QC){Q} +\uput{0.3}[-100]{0}(MW){M$_{\text{w}}$} +\pnode([offset=1.3cm]{MC}PC){PCO} +\pnode([offset=-1.3cm]{PC}MC){MCO} +\pnode([offset=-1.3cm]{PC}MW){MWO} +\psline[linewidth=1.5pt](MWO)(MW) +\psline[linewidth=1.5pt](MCO)(MC) +\pcline[offset=-5pt,linewidth=1.5pt,linecolor=BrickRed]{<->}(MWO)(MCO) +\ncput*{\color{BrickRed}$R=\rho - r$} +\psdot[dotsize=5pt](QC) +\psdot[dotsize=5pt](MW) +\pscircle[linewidth=1.5pt](MW){!rW} +\psarcn[linewidth=1.5pt,linecolor=BrickRed]{->}(MW){!rW 0.5 add}{180}{150} +\uput{3.65}[165]{0}(MW){$\omega=\dot{\varphi}$} +%\multido{\iC=0+1}{11}{% +%\definecolor[ps]{rainbow}{hsb}{0.9 \iC\space 15 div sub 0.95 0.7 }% +%\rput{!-90 \iC\space 0.5 mul 180 mul Pi div rW div sub alpha sub}(MW){\psline[linewidth=1.5pt,linecolor=rainbow](!rW 0)(!rW 0.2 sub 0)} +%\rput{!-90 \iC\space 0.5 mul 180 mul Pi div Rhox0 div sub alpha sub}(MC){\psline[linewidth=1.5pt,linecolor=rainbow](!Rhox0 0)(!Rhox0 0.2 add 0)} +%} +%%\rput(MW){\psline[linewidth=1.5pt]{->}(0,0)(!tex 4 mul tey 4 mul)} +\rput{!beta}(MW){\pcline[linewidth=1.2pt,linecolor=BrickRed]{->}(0,0)(2,0)\nbput[npos=0.7]{\color{BrickRed}$\vv{v_{\text{c}}}$}} +\rput{0}(MC){\uput{!Rho}[-19]{0}(0,0){\color{cyan}G$_{f}$}} +\rput{-40}(MC){\pnode(!Rho rW sub 0){MWI}} +\rput{-40}(MC){\pnode(!Rho 0){PCI}} +\pscircle[linewidth=1.2pt,linecolor=gray,linestyle=dashed](MWI){!rW} +\psarc[linewidth=1.5pt,linecolor=gray,linestyle=dashed](MC){!Rhox0 rW sub}{290}{330} +\pcline[linewidth=1pt,nodesepB=0,linecolor=cyan!60,linestyle=dashed](PCI)(MC) +\pcline[linewidth=1.5pt,nodesepB=0,linecolor=gray,linestyle=dashed](MWI)(MC) +\psdot[dotsize=5pt,linecolor=gray](MWI) +\psdot[dotsize=5pt,linecolor=gray](PCI) +\uput{0.3}[-20]{0}(PCI){$\text{P}'$} +\uput{0.3}[0]{0}(MWI){$\text{M}_{\text{w}}'$} +\multido{\iC=0+1}{11}{% +\definecolor[ps]{rainbow}{hsb}{0.9 \iC\space 15 div sub 1 \iC\space 11 div sub 0.7 }% +\rput{!-90 \iC\space 0.5 mul 180 mul Pi div rW div sub -50 sub}(MWI){\psline[linewidth=1.5pt,linecolor=rainbow](!rW 0)(!rW 0.2 sub 0)} +\rput{!-90 \iC\space 0.5 mul 180 mul Pi div Rhox0 div sub -50 sub}(MC){\psline[linewidth=1.5pt,linecolor=rainbow](!Rhox0 0)(!Rhox0 0.2 add 0)} +} +%\multido{\iC=0+1}{11}{% +%\rput{!-90 \iC\space 0.5 mul 180 mul Pi div rW div sub alpha sub 50 gamma sub Rhox0 mul rW div sub}(MWI){\psline[linewidth=1.5pt,linecolor=gray!50](!rW 0)(!rW 0.2 sub 0)} +%} +\rput{!beta}(PC){\pcline[linewidth=2pt,linecolor=Green]{->}(0,0)(1.5,0)\nbput[npos=0.7,nrot={!beta neg}]{\color{Green}$\vv{e_{\text{t}}}$}} +\rput{!gamma}(PC){\pcline[linewidth=2pt,linecolor=Green]{->}(0,0)(1.5,0)\nbput[npos=0.7,nrot={!gamma neg}]{\color{Green}$\vv{e_{\text{n}}}$}} +\end{pspicture} + +The condition of a rolling wheel without slipping forces, that the center of the wheel needs to make a rotation around the point P. Therefore, the center moves with the velocity: +\begin{equation*} + \vv{v_{\text{c}}} = r\cdot \dot{\varphi}\cdot \vv{e_{\text{t}}} \qquad \text{with normed tangent vector } \vv{e_{\text{t}}} +\end{equation*} +Cause the center of the wheel also moves along the circle around M$_{\text{c}}$ with radius $\rho - r$ and therefore the point P moves through the distance $\Delta s$ to the point $\text{P}'$---the velocities in M$_\text{w}$ and in P behave like their corresponding radii: \begin{equation*} -\omega=\frac{\text{d}\varphi}{\text{d}t}\quad\text{ and }\quad \dot{s}=\sqrt{1+f'(x)^2}\cdot\frac{\text{d}x}{\text{d}t} + \vv{v_{\text{c}}} = \frac{\rho - r}{\rho}\cdot \frac{\Delta s}{\Delta t} \cdot \vv{e_{\text{t}}} \qquad \text{with very small intervals, thus }\quad \frac{\Delta s}{\Delta t} = \dot{s} \end{equation*} -this finally leads to +Equating the right sides of both equations for the velocity of the center of the wheel finally leads to: \begin{equation*} -\text{d} \varphi=\left(\frac{1}{r}-\frac{1}{\varrho}\right)\cdot\sqrt{1+f'(x)^2}\,\text{d}x + r\cdot \dot{\varphi} = \frac{\rho - r}{\rho}\cdot \dot{s} \qrq \frac{\text{d}\varphi}{\text{d}t} = \frac{\rho - r}{\rho \cdot r}\cdot \frac{\text{d}s}{\text{d}t} \qrq \text{d}\varphi = \frac{\rho - r}{\rho \cdot r}\cdot \text{d}s = \frac{\rho - r}{\rho \cdot r}\cdot \sqrt{1+[f'(x)]^{2}} \cdot \text{d}x \end{equation*} @@ -547,7 +719,7 @@ Here follows a list of the vehicles that come along with the package: \section{Predefined wheels} -In this section we present the predefined wheels that can be used for the front or back wheel. +In this section we present $12$ predefined wheels that can be used for the front and/or the back wheel. @@ -641,6 +813,16 @@ In this section we present the predefined wheels that can be used for the front +\subsection{\textbackslash SpokesWheelB} + +\begin{LTXexample}[pos=l,width=2cm] +\begin{pspicture}(-1,-1)(1,1) +\rput(!/rB 1 def 0 0){\SpokesWheelB} +\end{pspicture} +\end{LTXexample} + + + \subsection{\textbackslash TractorFrontWheel} \begin{LTXexample}[pos=l,width=2cm] @@ -671,7 +853,7 @@ This package offers the following command: \textbf{Important note:} The function has to be given in algebraic notation and not in RPN. -The package \LPack{pst-vehicle} contains the options \nxLkeyword{epsilon=}, \nxLkeyword{rB=}, \nxLkeyword{rF=}, \nxLkeyword{d=}, \nxLkeyword{gang=}, \nxLkeyword{vehicle=}, \nxLkeyword{ownvehicle=}, \nxLkeyword{backwheel=}, \nxLkeyword{frontwheel=}, \nxLkeyword{MonoAxis=} and \nxLkeyword{showSlope=} +The package \LPack{pst-vehicle} contains the options \nxLkeyword{epsilon=}, \nxLkeyword{rB=}, \nxLkeyword{rF=}, \nxLkeyword{d=}, \nxLkeyword{gang=}, \nxLkeyword{vehicle=}, \nxLkeyword{ownvehicle=}, \nxLkeyword{backwheel=}, \nxLkeyword{frontwheel=}, \nxLkeyword{MonoAxis=}, \nxLkeyword{showSlope=} and \nxLkeyword{startPos=} \begin{quote} \begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule \emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule @@ -686,6 +868,7 @@ The package \LPack{pst-vehicle} contains the options \nxLkeyword{epsilon=}, \nxL \Lkeyword{frontwheel} & \texttt{\textbackslash wheelA} & wheelA is chosen by default\\ \Lkeyword{MonoAxis} & false & if the vehicle has one axis\\ \Lkeyword{showSlope} & true & showing the slope of the vehicle\\ +\Lkeyword{startPos} & 0 & synchronizing the initial rotation of the wheels at the start point\\ \bottomrule \end{tabularx} \end{quote} @@ -759,9 +942,18 @@ The same body of the vehicle is chosen as within the example above, but the fron \end{LTXexample} +\newpage + \section{Animation} +In case of animation there is a thing to be said: If tex memory is exceeded, please increase your memory. For \TeX{}Live users this can be done within the \texttt{texmf.cnf}. We chose the following: +\begin{lstlisting} +main_memory = 12000000 % words of inimemory available; also applies to inimf&mp +extra_mem_top = 60000000 % extra high memory for chars, tokens, etc. +extra_mem_bot = 12000000 % extra low memory for boxes, glue, breakpoints, etc. +\end{lstlisting} + \begin{LTXexample}[pos=t,width=15cm] \def\funkg{0.25*(x-3)*sin(0.2*(x-2))-1} \begin{animateinline}[controls,palindrome, |