Computer Languages History
(Click or use local copy.)
 CS 3723/3721
 Programming Languages
 Spring 2005

 Recitation 13
 Postscript: Business Card
    Week 13: Apr 18-22
 Due (on time): 2005-04-25  23:59:59
 Due (late):        2005-04-29  23:59:59

Recitation 13 must be submitted following directions at: submissions with deadlines
  • 2005-04-25  23:59:59 (that's Monday, 25 April 2005, 11:59:59 pm) for full credit.
  • 2005-04-29  23:59:59 (that's Friday, 29 April 2005, 11:59:59 pm) for 75% credit.

A Business Card in Postscript: For this recitation, you are to write a program in Postscript that will print a "business card", either for you, or for some fictitious individual or company. Graphic art often uses a principle of "less is more", meaning that a simple design is often more effictive than a more complex one. Here are some examples of simple design:

However, this is not an art assignment, and you are not being graded on "good graphic design." Instead I want you to experiment with complicated Postscript code to help learn the language. Here are requirements for the recitation:

  1. The initial card must be exactly 4 inches by 7 inches. (That is, the card must be exactly 288 points by 504 points.)
  2. The outer 4 inch by 7 inch boundary must be stroked with a line of width 3 points.
  3. With one run, translating the card if necessary, print a single copy of your card on a sheet of paper. Again, this must be 4 inches by 7 inches without scaling. Recitations meeting last semester's specifications will not be accepted at all.
  4. In a separate run, using a scale factor of 0.5 in each direction, produce at least 5 copies of the same card at half size, that is, of size 2 inches by 3.5 inches. The Postscript code that produces these 5 copies must employ a Postscript loop. (See pages 51-52 and Chapter 7 of the Blue Book (PDF, 847k).)
  5. At least one piece of text on the card must either be centered or right justified, using the stringwidth function, so that the text would remain centered or right-justified even if the font size is changed. (See the Blue Book, pages 42-43 for right justification, and pages 58-59 for centering. See also my handout with a card on it.)

Here are some additional features that I would like to see you incorporate into your card:

  1. The use of some ``graphic object'', e.g., some picture made up of one or more paths. For example, a recursive structure like that on pages 73-75 of the Blue Book would be interesting.
  2. Use some color, although your final printout doesn't have to be on a color printer.
  3. The use of an outline around characters in a string. (See the example on page 98 of the Blue Book.)
  4. The use of a clipping path. (See the Blue Book, pages 103-104.)

Finally, try to make it look interesting. Be creative. The card doesn't have to have your real name. Don't just copy the book or one another or my card below.


Examples of Cards: Two cards from the Blue Book plus one of my own:


What you should submit: In the normal way you should submit the Postscript source for the three programs:

  1. the first producing a 4 inch by 7 inch version of your business card.
  2. The second producing at least 5 copies of your business card at size 2 inches by 3.5 inches, all on one sheet of paper. (Scaled by 0.5.)

Then in the next class meeting (or under my door) submit printouts of the two programs, along with a printout of the output when the program is sent to a postscript printer. For full credit this should be on or before the start of class on Wednesday, 27April 2005, the day before the Thanksgiving holiday.

The number of points credit you receive will depend on how interesting and complex your Postscript code is. Code that just copies code that you have been supplied will not get much credit compared with original code.

It is permissible to use code from other sources as part of your card, but you must cite this source in the code that you submit.


Revision date: 2005-04-18. (Please use ISO 8601, the International Standard Date and Time Notation.)