(Click or use local copy.)

 CS 3721, Spring 2004
 Programming Languages

 Recitation 12: April 5, 7, 12, 14
 Postscript: Business Card
    MW   09:00-09:50 pm, SB 3.01.04
 Due by email: 2004-04-19 23:59:59

Recitation 12 must be sent by email following directions at: email submissions on or before
  • 2004-04-19  23:59:59 (that's Monday, 19 April 2004, 11:59:59 pm) for full credit.
  • 2004-04-23  23:59:59 (that's Friday, 23 April 2004, 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.

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.
  2. The use of an outline around characters in a string. (See the example on page 98 of the Blue Book.)
  3. The use of a clipping path, especially one involving a string of characters. (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 two runs:

Then in the next class meeting (or under my door) submit printouts of the two programs.

The number of points credit you receive will depend on how interesting and complex your Postscript code is. (This is not an art assignment, and you are not being graded on "good graphic design.")


Revision date: 2004-03-19. (Please use ISO 8601, the International Standard Date and Time Notation.)