[pstricks] Errata about chronophotography

Juergen Gilg gilg at acrotex.net
Sun Jul 15 16:50:23 CEST 2007


Hi all together,

here a method to get the ball gliding...

Regards,
Juergen

\documentclass[12pt]{article}% by Jean-Côme Charpentier
                             % and Herbert Voss
%\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}
%\usepackage{lmodern}

\usepackage[%
    driver=dvipsone,
    web={pro},
    uselayers,
    eforms,
    attachsource=tex
]{aeb_pro}

% You have to install aeb
% http://www.ctan.org/tex-archive/help/Catalogue/entries/acrotex.html
% And as an additional package install
% http://www.ctan.org/tex-archive/help/Catalogue/entries/aeb-pro.html
% Note, that there is Adobe Distiller 7.0 or later required to produce
% the Optional Content Groups (layers).
% Follow the installing instructions in the Documentation
% shipped with the zip files.
% To view the PDFs, Adobe Reader 7.0 or later is required.

\usepackage[nomessages]{fp}

\usepackage{geometry}
\geometry{lmargin=1cm,rmargin=0.cm,tmargin=0.5cm,bmargin=0.25cm}

\usepackage{pst-slpe,pstricks-add}

\newpsstyle{magenta40}{fillstyle=solid,fillcolor=magenta!40}
\newpsstyle{blue40}{fillstyle=solid,fillcolor=blue!60}
\newpsstyle{ball}{fillstyle=ccslope,slopebegin=white,slopeend=black}

% inclined plane
\newcommand*\ChronoSlope{30 }
\newcommand*\ChronoSlopeN{180  \ChronoSlope sub }

% Length of inclined plane (that is, the ball course!)
\newcommand*\ChronoLength{15 }
\newcommand*\rBall{0.5 }
\newcommand*\mass{1 }

\def\Acceleration{9.81 \ChronoSlope sin mul }
\def\S#1{   % way as function of time, returns x y
  0.5 \Acceleration mul #1 dup mul mul     % S(t)
  dup \ChronoSlope cos mul                 % Sx
  exch \ChronoSlope sin mul neg \CVL add } % Sy

\def\tEnd{2 \ChronoLength mul \Acceleration div sqrt }

% Chrono Horizontal Length
\newcommand*{\CHL}{\ChronoSlope cos \ChronoLength mul }
% Chrono Vertical Length
\newcommand*{\CVL}{\ChronoSlope sin \ChronoLength mul }

\begin{document}
\DeclareAnime{glide}{10}{40}

\def\thisframe{\animeBld%
\rput(! \S{\xi} ){%
      \pscircle[style=ball](!90 \ChronoSlope sub cos \rBall mul
                             90 \ChronoSlope sub sin \rBall mul)
                           {\rBall}}
    \psline[linestyle=dashed]{*-}(! \S{\xi} )(! \S{\xi} pop -0.2)
\eBld}

\begin{pspicture}(-1.75,-1.25)(14.5,10.5)

    \FPdiv{\myDelta}{2.5}{\nFrames}%
    \def\xi{0}%
    \multido{\i=1+1}{\nFrames}{\FPadd{\xi}{\xi}{\myDelta}\thisframe}
   
  \pspolygon[style=magenta40](0,0)(!\CHL 0)(!0 \CVL)
  \rput[rt](14,8){\large\textbf{A gliding ball}}
%  \rput(! \S{2.5} pop 0 ){\pscircle[style=ball](0,\rBall){\rBall}}
%  \psline[arrowscale=2]{->}%
%    (! \S{2.5} pop \rBall )(! \S{2.5} pop 1 add \rBall )
%  \rput{-\ChronoSlope}(! \S{2.25} ){%
%    \psline[arrowscale=2]{->}%
%      (! 0 90 \ChronoSlope add sin \rBall mul)
%      (! 1 90 \ChronoSlope add sin \rBall mul)}
  \psset{linewidth=0.2pt,tbarsize=5mm,arrowscale=2,arrows=|<->|}
  \pcline(-0.75,0)(!-0.75 \CVL)
  \ncput*[nrot=:U]{length\,$\cdot\sin\alpha$}
  \pcline(0,-0.75)(! \CHL -0.75)
  \ncput*{length\,$\cdot\cos\alpha$}
  \rput{-\ChronoSlope}%
     (!\rBall 4 mul \ChronoSlope sin mul
       \CVL \rBall 4 mul \ChronoSlope cos mul add)%
       {\pcline(0,0)(\ChronoLength,0)\ncput*{length}}
  \psarcn[arrows=<-](!\CHL 0){3}{180}{!\ChronoSlopeN}
  \uput*{2cm}[165](!\CHL 0){$\alpha$}
\end{pspicture}%}

\vspace{1cm}

\begin{center}
\backAnimeBtn{24bp}{12bp}\kern1bp\clearAnimeBtn{24bp}{12bp}\kern1bp\forwardAnimeBtn{24bp}{12bp}
\end{center}

\vspace{1cm}

\psset{llx=-1.75, lly=-1.75, xAxisLabel={$t[\rm{sec}]$},
  yAxisLabel={$s[\rm{m}]/v[\rm{m/sec}]$}}
%
% The value 13.8cm is the only problem here, should also be
% calculated by a macro
%
\begin{psgraph}[Dy=2,Dx=0.25]{->}(0,0)(2.5,16){13.2cm}{8cm}
  \psline[linecolor=blue!50,linewidth=2pt]%
    (! 2 \ChronoLength mul \Acceleration div sqrt -0.2)%
    (! 2 \ChronoLength mul \Acceleration div sqrt 0.2)
  \psplot[linecolor=blue,linewidth=2pt]{0}{\tEnd}{% S(t)
       0.5 \Acceleration mul x dup mul mul }
  \rput[lb](0.5,14)%
    {\color{blue}%
      $s(t)=\frac{1}{2}(\,g\cdot\sin\alpha)\cdot t^2$}
  \psline[linecolor=blue,linewidth=0.5pt,linestyle=dashed]%
     (0,\ChronoLength)(! \tEnd \ChronoLength)(!\tEnd 0)
  \uput*{20pt}[90](! \tEnd 0){\textbf{$t_{End}$}}
  \psplot[linecolor=red,linewidth=2pt]{0}{\tEnd}{% Sy(t)
     0.5 \Acceleration mul x dup mul mul
     \ChronoSlope sin mul neg \CVL add}
  \rput[lb](0.5,13)%
    {\color{red}%
      $h(t)=Height-\frac{1}{2}
        (\,g\cdot\sin^2\alpha)\cdot t^2\sim W_{pot}$}
  \psplot[linecolor=green,linewidth=2pt]{0}{\tEnd}{% Sx(t)
    0.5 \Acceleration mul x dup mul mul \ChronoSlope cos mul }
  \rput[lb](0.5,12)%
    {\color{green}%
      $w(t)=\frac{1}{2}(\,g\cdot\sin\alpha\cos\alpha)\cdot t^2$}
  \psplot[linestyle=dashed,linecolor=magenta,linewidth=2pt]%
    {0}{\tEnd}{\Acceleration x mul }
  \rput[lb](0.5,11)%
    {\color{magenta}%
      $v(t)=g\cdot\sin\alpha\cdot  t\sim \sqrt{W_{kin}}$}
  \psline[linecolor=black!60,linestyle=dashed,linewidth=2pt]%
     (!0 \Acceleration)(!\tEnd \Acceleration)
  \rput[lb](0.5,10){\color{black!60}$a(t)=g\cdot\sin\alpha$}
% Energy
  \psplot[linecolor=black!30,linewidth=1pt]{0}{\tEnd}{% Sy(t)
     \mass 9.81 mul 0.5 \Acceleration mul x dup mul mul
     \ChronoSlope sin mul neg \CVL add mul 10 div}
\end{psgraph}

\end{document}





Jean-Côme Charpentier wrote:
> Sorry! Copy-paste error.
>
> Replace all the "t2" by "t ^ 2"
> Replace the (single) "\sin2\alpha" by "\sin ^ 2\alpha"
>
>   Jean-Côme Charpentier
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
>   

-- 
  jürgen gilg
  austr. 59
  70376 stuttgart

tel       0711-59 27 88
e-mail    gilg at acrotex.net
webpage   www.acrotex.net
          www.gilligan-online.de
          www.brueckenkurs-physik.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20070715/111fe0fe/attachment.html 


More information about the PSTricks mailing list