<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Myriad Pro">Hi all together,<br>
<br>
here a method to get the ball gliding...<br>
<br>
Regards,<br>
Juergen<br>
<br>
\documentclass[12pt]{article}% by Jean-C&ocirc;me Charpentier<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; % and Herbert Voss<br>
%\usepackage[T1]{fontenc}<br>
%\usepackage[utf8]{inputenc}<br>
%\usepackage{lmodern}<br>
<br>
\usepackage[%<br>
&nbsp;&nbsp;&nbsp; driver=dvipsone,<br>
&nbsp;&nbsp;&nbsp; web={pro},<br>
&nbsp;&nbsp;&nbsp; uselayers,<br>
&nbsp;&nbsp;&nbsp; eforms,<br>
&nbsp;&nbsp;&nbsp; attachsource=tex<br>
]{aeb_pro}<br>
<br>
% You have to install aeb<br>
% <a class="moz-txt-link-freetext" href="http://www.ctan.org/tex-archive/help/Catalogue/entries/acrotex.html">http://www.ctan.org/tex-archive/help/Catalogue/entries/acrotex.html</a><br>
% And as an additional package install<br>
% <a class="moz-txt-link-freetext" href="http://www.ctan.org/tex-archive/help/Catalogue/entries/aeb-pro.html">http://www.ctan.org/tex-archive/help/Catalogue/entries/aeb-pro.html</a><br>
% Note, that there is Adobe Distiller 7.0 or later required to produce<br>
% the Optional Content Groups (layers).<br>
% Follow the installing instructions in the Documentation <br>
% shipped with the zip files.<br>
% To view the PDFs, Adobe Reader 7.0 or later is required.<br>
<br>
\usepackage[nomessages]{fp}<br>
<br>
\usepackage{geometry}<br>
\geometry{lmargin=1cm,rmargin=0.cm,tmargin=0.5cm,bmargin=0.25cm}<br>
<br>
\usepackage{pst-slpe,pstricks-add}<br>
<br>
\newpsstyle{magenta40}{fillstyle=solid,fillcolor=magenta!40}<br>
\newpsstyle{blue40}{fillstyle=solid,fillcolor=blue!60}<br>
\newpsstyle{ball}{fillstyle=ccslope,slopebegin=white,slopeend=black}<br>
<br>
% inclined plane<br>
\newcommand*\ChronoSlope{30 }<br>
\newcommand*\ChronoSlopeN{180&nbsp; \ChronoSlope sub }<br>
<br>
% Length of inclined plane (that is, the ball course!)<br>
\newcommand*\ChronoLength{15 }<br>
\newcommand*\rBall{0.5 }<br>
\newcommand*\mass{1 }<br>
<br>
\def\Acceleration{9.81 \ChronoSlope sin mul }<br>
\def\S#1{&nbsp;&nbsp; % way as function of time, returns x y<br>
&nbsp; 0.5 \Acceleration mul #1 dup mul mul&nbsp;&nbsp;&nbsp;&nbsp; % S(t)<br>
&nbsp; dup \ChronoSlope cos mul&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; % Sx<br>
&nbsp; exch \ChronoSlope sin mul neg \CVL add } % Sy<br>
<br>
\def\tEnd{2 \ChronoLength mul \Acceleration div sqrt }<br>
<br>
% Chrono Horizontal Length<br>
\newcommand*{\CHL}{\ChronoSlope cos \ChronoLength mul }<br>
% Chrono Vertical Length<br>
\newcommand*{\CVL}{\ChronoSlope sin \ChronoLength mul }<br>
<br>
\begin{document}<br>
\DeclareAnime{glide}{10}{40}<br>
<br>
\def\thisframe{\animeBld%<br>
\rput(! \S{\xi} ){%<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \pscircle[style=ball](!90 \ChronoSlope sub cos \rBall mul<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90 \ChronoSlope sub sin \rBall mul)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {\rBall}}<br>
&nbsp;&nbsp;&nbsp; \psline[linestyle=dashed]{*-}(! \S{\xi} )(! \S{\xi} pop -0.2)<br>
\eBld}<br>
<br>
\begin{pspicture}(-1.75,-1.25)(14.5,10.5)<br>
<br>
&nbsp;&nbsp;&nbsp; \FPdiv{\myDelta}{2.5}{\nFrames}%<br>
&nbsp;&nbsp;&nbsp; \def\xi{0}%<br>
&nbsp;&nbsp;&nbsp; \multido{\i=1+1}{\nFrames}{\FPadd{\xi}{\xi}{\myDelta}\thisframe}<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp; \pspolygon[style=magenta40](0,0)(!\CHL 0)(!0 \CVL)<br>
&nbsp; \rput[rt](14,8){\large\textbf{A gliding ball}}<br>
%&nbsp; \rput(! \S{2.5} pop 0 ){\pscircle[style=ball](0,\rBall){\rBall}}<br>
%&nbsp; \psline[arrowscale=2]{-&gt;}%<br>
%&nbsp;&nbsp;&nbsp; (! \S{2.5} pop \rBall )(! \S{2.5} pop 1 add \rBall )<br>
%&nbsp; \rput{-\ChronoSlope}(! \S{2.25} ){%<br>
%&nbsp;&nbsp;&nbsp; \psline[arrowscale=2]{-&gt;}%<br>
%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (! 0 90 \ChronoSlope add sin \rBall mul)<br>
%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (! 1 90 \ChronoSlope add sin \rBall mul)}<br>
&nbsp; \psset{linewidth=0.2pt,tbarsize=5mm,arrowscale=2,arrows=|&lt;-&gt;|}<br>
&nbsp; \pcline(-0.75,0)(!-0.75 \CVL)<br>
&nbsp; \ncput*[nrot=:U]{length\,$\cdot\sin\alpha$}<br>
&nbsp; \pcline(0,-0.75)(! \CHL -0.75)<br>
&nbsp; \ncput*{length\,$\cdot\cos\alpha$}<br>
&nbsp; \rput{-\ChronoSlope}%<br>
&nbsp;&nbsp;&nbsp;&nbsp; (!\rBall 4 mul \ChronoSlope sin mul<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \CVL \rBall 4 mul \ChronoSlope cos mul add)%<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {\pcline(0,0)(\ChronoLength,0)\ncput*{length}}<br>
&nbsp; \psarcn[arrows=&lt;-](!\CHL 0){3}{180}{!\ChronoSlopeN}<br>
&nbsp; \uput*{2cm}[165](!\CHL 0){$\alpha$}<br>
\end{pspicture}%}<br>
<br>
\vspace{1cm}<br>
<br>
\begin{center}<br>
\backAnimeBtn{24bp}{12bp}\kern1bp\clearAnimeBtn{24bp}{12bp}\kern1bp\forwardAnimeBtn{24bp}{12bp}<br>
\end{center}<br>
<br>
\vspace{1cm}<br>
<br>
\psset{llx=-1.75, lly=-1.75, xAxisLabel={$t[\rm{sec}]$},<br>
&nbsp; yAxisLabel={$s[\rm{m}]/v[\rm{m/sec}]$}}<br>
%<br>
% The value 13.8cm is the only problem here, should also be<br>
% calculated by a macro<br>
%<br>
\begin{psgraph}[Dy=2,Dx=0.25]{-&gt;}(0,0)(2.5,16){13.2cm}{8cm}<br>
&nbsp; \psline[linecolor=blue!50,linewidth=2pt]%<br>
&nbsp;&nbsp;&nbsp; (! 2 \ChronoLength mul \Acceleration div sqrt -0.2)%<br>
&nbsp;&nbsp;&nbsp; (! 2 \ChronoLength mul \Acceleration div sqrt 0.2)<br>
&nbsp; \psplot[linecolor=blue,linewidth=2pt]{0}{\tEnd}{% S(t)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.5 \Acceleration mul x dup mul mul }<br>
&nbsp; \rput[lb](0.5,14)%<br>
&nbsp;&nbsp;&nbsp; {\color{blue}%<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $s(t)=\frac{1}{2}(\,g\cdot\sin\alpha)\cdot t^2$}<br>
&nbsp; \psline[linecolor=blue,linewidth=0.5pt,linestyle=dashed]%<br>
&nbsp;&nbsp;&nbsp;&nbsp; (0,\ChronoLength)(! \tEnd \ChronoLength)(!\tEnd 0)<br>
&nbsp; \uput*{20pt}[90](! \tEnd 0){\textbf{$t_{End}$}}<br>
&nbsp; \psplot[linecolor=red,linewidth=2pt]{0}{\tEnd}{% Sy(t)<br>
&nbsp;&nbsp;&nbsp;&nbsp; 0.5 \Acceleration mul x dup mul mul<br>
&nbsp;&nbsp;&nbsp;&nbsp; \ChronoSlope sin mul neg \CVL add}<br>
&nbsp; \rput[lb](0.5,13)%<br>
&nbsp;&nbsp;&nbsp; {\color{red}%<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $h(t)=Height-\frac{1}{2}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (\,g\cdot\sin^2\alpha)\cdot t^2\sim W_{pot}$}<br>
&nbsp; \psplot[linecolor=green,linewidth=2pt]{0}{\tEnd}{% Sx(t)<br>
&nbsp;&nbsp;&nbsp; 0.5 \Acceleration mul x dup mul mul \ChronoSlope cos mul }<br>
&nbsp; \rput[lb](0.5,12)%<br>
&nbsp;&nbsp;&nbsp; {\color{green}%<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $w(t)=\frac{1}{2}(\,g\cdot\sin\alpha\cos\alpha)\cdot t^2$}<br>
&nbsp; \psplot[linestyle=dashed,linecolor=magenta,linewidth=2pt]%<br>
&nbsp;&nbsp;&nbsp; {0}{\tEnd}{\Acceleration x mul }<br>
&nbsp; \rput[lb](0.5,11)%<br>
&nbsp;&nbsp;&nbsp; {\color{magenta}%<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $v(t)=g\cdot\sin\alpha\cdot&nbsp; t\sim \sqrt{W_{kin}}$}<br>
&nbsp; \psline[linecolor=black!60,linestyle=dashed,linewidth=2pt]%<br>
&nbsp;&nbsp;&nbsp;&nbsp; (!0 \Acceleration)(!\tEnd \Acceleration)<br>
&nbsp; \rput[lb](0.5,10){\color{black!60}$a(t)=g\cdot\sin\alpha$}<br>
% Energy<br>
&nbsp; \psplot[linecolor=black!30,linewidth=1pt]{0}{\tEnd}{% Sy(t)<br>
&nbsp;&nbsp;&nbsp;&nbsp; \mass 9.81 mul 0.5 \Acceleration mul x dup mul mul<br>
&nbsp;&nbsp;&nbsp;&nbsp; \ChronoSlope sin mul neg \CVL add mul 10 div}<br>
\end{psgraph}<br>
<br>
\end{document} <br>
<br>
<br>
<br>
<br>
</font><br>
Jean-C&ocirc;me Charpentier wrote:
<blockquote cite="mid:46996304.3020600@wanadoo.fr" type="cite">
  <pre wrap="">Sorry! Copy-paste error.

Replace all the "t2" by "t ^ 2"
Replace the (single) "\sin2\alpha" by "\sin ^ 2\alpha"

  Jean-C&ocirc;me Charpentier

_______________________________________________
pstricks mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pstricks@tug.org">pstricks@tug.org</a>
<a class="moz-txt-link-freetext" href="http://tug.org/mailman/listinfo/pstricks">http://tug.org/mailman/listinfo/pstricks</a>


  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="65">-- 
  j&uuml;rgen gilg
  austr. 59
  70376 stuttgart

tel       0711-59 27 88
e-mail    <a class="moz-txt-link-abbreviated" href="mailto:gilg@acrotex.net">gilg@acrotex.net</a>
webpage   <a class="moz-txt-link-abbreviated" href="http://www.acrotex.net">www.acrotex.net</a>
          <a class="moz-txt-link-abbreviated" href="http://www.gilligan-online.de">www.gilligan-online.de</a>
          <a class="moz-txt-link-abbreviated" href="http://www.brueckenkurs-physik.de">www.brueckenkurs-physik.de</a></pre>
</body>
</html>