|
|
CS 3723/3721
Programming Languages
Fall 2004
Recitation 13
Postscript: Business Card
Week 13: Nov 15-19
Due (on time):
2004-11-22 23:59:59
Due (late):
2004-11-26 23:59:59
|
Recitation 13 must be submitted
following directions at: submissions with deadlines
- 2004-11-22 23:59:59 (that's Monday, 22 November 2004, 11:59:59 pm)
for full credit.
- 2004-11-26 23:59:59 (that's Friday, 26 November 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:
- The initial card must be exactly 2 inches by 3.5 inches.
With one run, translating the card if necessary, print a single copy of
your card on a sheet of paper. (It might be easiest to put the lower
left corner of the card at the origin (0, 0) of the Postscript coordinates,
that is, the lower left corner of the page. Note that your card should be
144 points by 252 points.)
- The outer 2 inch by 3.5 inch boundary must be stroked with a
line of width 1 point.
- Produce another copy of the same card, but magnified by a factor of 3
and printed horizontally, so that the final card will be 6 inches by 10.5
inches on one sheet. You will need to rotate by 90 degrees, and scale by
3 in both x and y directions, and translate by some amount, though perhaps
not in that order.
Recitations meeting last semester's
specifications will not be accepted at all.
- In a third run produce at least 5 copies of the output card at
the initial size on a single sheet of paper. The Postscript code that
produces these 5 copies must employ a Postscript loop.
- 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:
- The use of some ``graphic object'', e.g., some picture made up
of one or more paths.
- The use of an outline around characters in a string. (See the
example on page 98 of the Blue Book.)
- 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:
- the first producing a 2 inch by 3.5 inch version
of your business card.
- The second producing a horizontal version of the card
3 times as big, of size 6 inches by 10.5 inches.
- the third producing at least
5 copies of your business card at size 2 inches by 3.5 inches,
all on one sheet of paper.
Then in the next class meeting (or
under my door) submit printouts of the three 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, 24 November 2004,
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 as much credit as more original code.
(This is not an art assignment, and you are not being graded
on "good graphic design.")
As in the previous Postscript assignment, 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: 2004-11-14.
(Please use ISO 8601,
the International Standard Date and Time Notation.)