home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.text.tex
- Path: sparky!uunet!brunix!doorknob!jgm
- From: jgm@cs.brown.edu (Jonathan Monsarrat)
- Subject: Re: Venn diagrams
- In-Reply-To: Richard P Hayes's message of Mon, 21 Dec 92 23:45:01 EST
- Message-ID: <JGM.92Dec22162718@vegas.cs.brown.edu>
- Sender: news@cs.brown.edu
- Organization: Dept. of Computer Science, Brown University
- References: <21DEC92.25650416.0078.MUSIC@MUSICA.MCGILL.CA>
- Date: Tue, 22 Dec 1992 21:27:18 GMT
- Lines: 77
-
-
- Well... it's not an sty file. It's PostScript! But will this help you? :)
-
- The below PostScript code defines some Venn diagrams and gives some
- examples of how to use them. Do you have to be a PostScript
- programmer? I don't think so. If I'm wrong, let me know and I'll patch
- together what you need it to look like.
-
- -Jon
- %! Jon Monsarrat jgm@cs.brown.edu Brown University %! Obfuscated PostScript
- (LcHdBidZi_hdQ6[PaVa1b4c6F"J4b/>$O<)(di_zk{:UFfUg;ABF)(2n>]Eh:u?<)(P"M#R\(:$T<)
- ([gXfSZ]f\\dZbeZeb^fH;`?dR=ZS7)(K P!U!: H<)(9l9cCf:o?$)(7W4]6`:X;=)(U"W#_%:"R-)
- (A 5"<&Y%K"F"M,M,S\)i3e.M5F_PZR9>lP-)(wBxEuEs7x;uBq:q<q>hFh7o:=Nj<)(Z#]#b#:$R-)
- (m+m+k3S!R+d,;"^<)(GFP\\RamZf;TAP{X{fd<{C7)(4840N2:6N=)([ Z#^&:!c<)(<%?$C$:#8<)
- (D!J"L#:!B<)/a{def}def/M{exch}a/S{repeat}a/Q{{40 add}if}a 18{{}forall/R M a/x 2
- /y 3/z 5 3{R M mod 1 eq a}S x Q M y Q moveto 57 sub{3{y Q M x Q M 6 2 roll}S
- curveto}S z{fill}{stroke}ifelse}S showpage
-
-
- ------------------------------- venn.ps ------------------
- %!Adobe-2.0 EPSF
- %%Creator: Jonathan Monsarrat (jgm@cs.brown.edu)
- %%CreationDate: 12/11/92
- %%Title: venn.ps
- %%BoundingBox: 0 50 450 250
- %% PostScript hack by Jon Monsarrat
- %% This figure is part of the answer to Exercise 5.1-1 in our CS253 book
-
- /radius 20 def
- /Symbol findfont 12 scalefont setfont
-
- /circle { 2 copy moveto radius 0 rmoveto radius 0 360 arc} def
- /venn {
- 0 0 moveto 150 0 lineto 150 150 lineto 0 150 lineto
- fill
-
- } bind def
-
- % [ str str shift - ]
- /shift
- {
- 0 setgray grestore
- 95 10 moveto dup stringwidth pop 2 div neg 0 rmoveto show
- 50 10 moveto dup stringwidth pop 2 div neg 0 rmoveto show
- 23 61 moveto (A) show
- 67 61 moveto (B) show
- 45 29 moveto (C) show
- A stroke B stroke C stroke
- 90 0 translate
- } bind def
-
- /A { 38 59 circle } def
- /B { 60 59 circle } def
- /C { 50 45 circle } def
-
- gsave
-
- 0 50 translate
-
- gsave .5 setgray A clip venn (A) (\310) shift
- gsave .5 setgray B clip newpath C fill ((B\307C)) (=) shift
- gsave .5 setgray A fill newpath B clip newpath C fill (A\310(B\307C)) (=) shift
- gsave .5 setgray A fill B fill ((A\310B)) (\307) shift
- gsave .5 setgray A fill C fill ((A\310C)) () shift
-
- grestore
- 0 150 translate
-
- gsave .5 setgray A clip venn (A) (\307) shift
- gsave .5 setgray B C clip venn ((B\310C)) (=) shift
- gsave .5 setgray A clip newpath B fill C fill (A\307(B\310C)) (=) shift
- gsave .5 setgray A clip newpath B fill ((A\307B)) (\310) shift
- gsave .5 setgray A clip newpath C fill ((A\307C)) () shift
-
-
-
- showpage
-