next up previous
Next: About this document ... Up: l_lab_1 Previous: l_lab_1

0. What is PostScript?

PostScript is a ``page description language''--a graphics language for printing text and pictures. It was developed by Adobe Systems, Inc. Its primary use is to be generated by programs to drive graphic output devices, but it is also human-readable. Some of its interesting characteristics:

Philosophy of this assignment: In the future, you will often run into a situation where there is something complicated that you need to go in and alter without having full knowledge--perhaps it will be a big program written by the employee you replaced, or a smaller program written in a special language with an obscure manual. In confronting such a situation, try to look for pieces of examples that you can follow.

This assignment is somewhat similar, since you are to write and modify PostScript using examples instead of the manuals. However, a few comments are provided in the examples.



Task A: ``Pure'' PostScript. Some example files named demo1.ps, demo2.ps, etc., can be found in the handout directories on both the NT and UNIX systems, whose locations were given in the previous paper handout.

The task is to use the ideas in these demos to make some Postscript file that is distinctly your own. If you can, do something interesting. If you're too pressed for time, do something more rudimentary. One or more interesting submissions may be posted for everyone to see.

Because debugging is so difficult, proceed in steps, starting with something that is almost like a demo and modifying it, while checking it with ghostview.

Submit your file as described in the previous handout. Name it lab1A.ps .



Task B. Landscape versus Portrait modes

PostScript initially assumes that the coordinate system has its origin at the lower left corner of the page when the paper is held with the longer way vertical (portrait mode). Suppose that the picture you want to draw is wider than it is long and you want to print it that way (landscape mode). The way to do this is to rotate and translate so that your data is changed to portrait mode (although it will be on its side when displayed on the screen), print it, and then hold the printed copy the landscape way.

In the handout directory you will find a file chi.ps, done by a former student in this course. It is presently in portrait mode. Put in extra changes of coordinates to make the picture come out turned sideways on the screen, so that if printed on paper it will be in landscape mode. A good place to to do this is marked in the file. You should decide what combination of translations and rotations is needed. Don't forget to change distances to inches if that's what you need. Notice that you can't just rotate the picture from a corner, since you'll be rotating it right off the screen; a translation will also be involved.

Submit the modified file, named lab1B.ps .


next up previous
Next: About this document ... Up: l_lab_1 Previous: l_lab_1
Kirby A. Baker 2002-01-23