On 2007-02-14 18:21+0100 Dominique MICOLLET wrote:

> Hello
>
> I wish to use plplot to make simple physics animation (such as a mobile thrown
> in the air) on a Debian Sarge.
> The plplot version is 5.7.2, used with Fortran program. I can use C if
> necessary.
>
> I need a set of images which will be used to feed ffmpeg.
>
> [...] I tried to use the pbm driver. I got a big
> file, in which I guess the successive images are dumped.
> But I don't know how to extract them.

To answer that question use one of the pnmto*** or pbmto*** applications.
For example, I have just successfully used

./x01c -dev pbm -o test.pbm
pnmtops < test.pbm >test.ps

However, the results are really low resolution and not nearly as good as
using -dev psc directly.  Probably some maintenance of -dev pbm is required
to get higher resolution, but it has been years since anybody worked on
that device driver.

> (1) Is there a way to drive the postscript driver to produce correctly
> oriented graphs : mine are counterclockwise rotated.

Use the -ori 1 option to rotate the postscript result the way you want, e.g.,

./x01c -dev psc -ori 1 -o test.ps

Use the -h command-line option to get help on lots of PLplot options.

[out of order]
> Currently I use the postscript driver (1) : a call to plenv() for each frame
> put a new page in the
> file. Then pstoimg gives me the set of images.
>
> I guess it is not the best way.

Probably not.  pstoimg converts postscript to either PNG or GIF images, but
it is probably better to use our -dev png or -dev gif devices directly.  You
will need the familying option (which turns PLplot pages into separate
files) since PNG or GIF formats have no concept of plot pages as produced by
PLplot.  Here is an example:

./x09c -dev gif -o test.gif -fam -fflen 3
ls test.gif.*
test.gif.001  test.gif.002  test.gif.003  test.gif.004  test.gif.005

Our ninth example has 5 separate pages which the -fam option turns into
5 separate files.  I have also shown the use of the -fflen option which
(in this case) insures the numerical suffix is three characters (in case
you have more than 100 pages).  I assume ffmpeg would have no trouble
converting a collection of gif images into a format suitable for animations,
but I would be interested in exactly which end format you have chosen.

After you finalize your PLplot-generated animation, I hope you post a link
to it because I think many of us will be interested in the result.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to