[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Depict symmetric difference in PIC
From: |
btober |
Subject: |
[Groff] Depict symmetric difference in PIC |
Date: |
Sun, 9 Oct 2016 20:50:03 -0400 (EDT) |
I would like to know if anyone can help me depict symmetric difference of sets
in PIC.
Searching the archives, I found some previous postings about basic Venn
diagrams,
and I have developed graphics for set union, intersection, and relative
complement, but I'm stuck on depicting the symmetric difference.
That is, given sets A, B, I want to depict the resulting set from
(A union B) - (A intersection B)
If A and B were depicted as overlapping circles, the symmetric difference would
be the two outer crescents.
Or alternatively, as
(A - B) union (B -A)
Here is (A - B)
.po 0.35i
.PS
move
{A: circle invisible fill rad 1.2}
move right 0.5
B: circle invisible fill 0 rad 1.4
.ps +10
move to A
move up 0.8
move left 0.35
"milk"
move left 0.2
move down 0.3
"juice"
move left .35
move down 0.35
"jam"
.PE
and here is (B - A)
.po 0.35i
.PS
move
{move right 0.5
B: circle invisible fill rad 1.4
}
{A: circle invisible fill 0 rad 1.2}
.ps +10
move to B
move up 1
move right 0.3
"butter"
move down 0.35
move right .2
"bacon"
move down 0.35
move right 0.15
"sausage"
move down 0.35
"ham"
.PE
- [Groff] Depict symmetric difference in PIC,
btober <=