GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PS_EVOL(1) User Contributed Perl Documentation PS_EVOL(1)

ps_evol - Perl script to fine-tune A4 PostScript drawings

 vi plant.ps
 # add comments like:    % evol step 0.05 min 0.0 max 1.0
 ps_evol plant.ps > p2.ps
 ps_evol -k plant.ps > p2.ps   # Keep the intermediate steps
 ps_evol -v        # print the version
 perldoc ps_evol   # read the manual :-)

ps_evol was mainly intended as a demo script illustrating the text_evol funtion in Math::Evol.pm. It assumes you have something like GhostView which allows you to view PostScript files.

It creates a temporary PostScript file, then repeatedly generates eight variants of the original file, scales them smaller, numbers them, and displays them in a 3x3 array. The original is in the middle, as number 5. It asks the user which variant they prefer, then uses that as the original for the next iteration. When the user decides to call a halt, the latest preferred variant is written to the standard output.

The parameters to be varied in the PostScript file must be marked out by special comments, such as

 /gray_sky .87 def % evol step 0.05 min 0.0 max 1.0

See perldoc Math::Evol for more details, and as an example the PostScript file plant.ps, included with the distribution.

-k
Keeps the intermediate steps of the evolution; they will be named like the source file but with an added number, like plant_001.ps plant_002.ps and so on. This can be useful if you want to make a movie of the evolution process, such as with:

 vi plant.eps
 # it should start with:  %%BoundingBox 0 0 1280 720
 ps_evol -k plant.eps
 for i in plant_*.eps   # you have enough disc, I hope ?
 do
     o=`echo $i | sed 's/eps$/jpg/'`
     gs -sDEVICE=jpeg -sOutputFile=$o -q -g1280x720 $i
 done
 # mencoder insists on consecutive numbers, so if you want to
 # delete one, you have to renumber all the subsequent files :-(
 mencoder -audiofile plantmusic.wav -oac pcm -fps 24 -ofps 24 \
   'mf://plant_*.jpg' -mf h=1280:w=720:fps=24:type=jpeg \
   -o plant.avi -ovc lavc -lavcopts vcodec=mpeg4:aspect=1.7778
 mplayer plant.avi
    
-v
Prints Version number.

Uses the CPAN module Term::Clui.pm to dialogue with the user.

Peter J Billam, www.pjb.com.au/comp/contact.html

Based on Math::Evol.pm, and conceptually on Richard Dawkin's Blind Watchmaker software.

Math::Evol.pm, Term::Clui.pm, http://www.pjb.com.au/, perl(1).
2017-06-13 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.