[pstricks] Outputting a particular value of a function using PSTricks

dpstory at uakron.edu dpstory at uakron.edu
Sat Sep 17 18:10:10 CEST 2005


Thanks, Herbert, that worked with a few modifications, I changed  \printValue to read

\def\printValue#1{%
  \pstVerb{gsave /Times findfont 1000 scalefont setfont #1 20 string cvs  1 -1 scale show grestore}}

Attached is a PDF that reflects this fix. It's an animation, created by the "Master of Anime",
Jürgen Gilg.

Adobe Reader 7.0 required for viewing.

dps


On 17 Sep 2005 at 15:07, Herbert Voss wrote:

> dpstory at uakron.edu wrote:
> > Hi all,
> > 
> > Is there a way of computing a particular value of a function, say sin(20), using PSTricks?
> > 
> > I wish to typset a sentence like:
> > 
> > y-coordinate:  sin(20)
> > 
> > This is part of a multido that is reading out the x and y coordinates in an animation we are 
> > trying to build.
> 
> for a TeX solution use the fp package or for a PS solution
> the following code
> 
> Herbert
> 
> 
> \documentclass[12pt]{article}
> \usepackage{pstricks,multido}
> %
> \def\printValue#1{%
>    \pstVerb{gsave /Times findfont 100 scalefont setfont #1 10 string cvs 
> 1 -1 scale show grestore}}
> %
> \parindent=0pt
> \begin{document}
> 
> \makebox[2em]{\#} \makebox[5em]{$sin x$} \makebox[5em]{$cos x$}
>                    \makebox[5em]{$\sqrt x$}\makebox[6em]{$sin^2 x+cos^2 
> x$}\\[3pt]
> \multido{\iA=0+10}{36}{
>      \makebox[1em]{\iA}
>      \makebox[5em]{\printValue{\iA\space sin}}
>      \makebox[5em]{\printValue{\iA\space cos}}
>      \makebox[5em]{\printValue{\iA\space sqrt}}
>      \makebox[6em]{\printValue{\iA\space dup sin dup mul exch cos dup 
> mul add}}\\}
> 
> \end{document}
> 
> 
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20050917/a48a316b/attachment.html 
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  APB_Animation_Example64.pdf
     Date:  17 Sep 2005, 12:03
     Size:  165562 bytes.
     Type:  Acrobat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: APB_Animation_Example64.pdf
Type: application/octet-stream
Size: 165562 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20050917/a48a316b/attachment.obj 


More information about the PSTricks mailing list