1 | (*
|
---|
2 | * $Source: /n/fs/vd/jsp/papers/dckp/RCS/hypercube.jgr,v $
|
---|
3 | * $Revision: 4.4 $
|
---|
4 | * $Date: 91/10/03 13:56:21 $
|
---|
5 | * $Author: jsp $
|
---|
6 | *
|
---|
7 | * Jgraph file containing a picture of a 3-D hypercube.
|
---|
8 | *)
|
---|
9 |
|
---|
10 | Y 2.3
|
---|
11 | newgraph
|
---|
12 | xaxis size 2.5 min 0 max 2.5 nodraw
|
---|
13 | yaxis size 2 min 0 max 2 nodraw
|
---|
14 | legend x 2.8 y 1.25
|
---|
15 | linelength 0.5
|
---|
16 |
|
---|
17 | (* The links are drawn first, so that the nodes will be drawn over them. *)
|
---|
18 |
|
---|
19 | newline linethickness 2 pts 0 0 1.5 0
|
---|
20 | copycurve pts 0 1.5 1.5 1.5
|
---|
21 | copycurve pts .5 .5 2.0 .5
|
---|
22 | copycurve pts 2 2 .5 2
|
---|
23 | label fontsize 12 : Dimension 0 links
|
---|
24 |
|
---|
25 | newline linethickness 2 linetype dotted pts 0 0 0 1.5
|
---|
26 | copycurve pts 1.5 0 1.5 1.5
|
---|
27 | copycurve pts .5 .5 .5 2.0
|
---|
28 | copycurve pts 2 2 2 .5
|
---|
29 | label fontsize 12 : Dimension 1 links
|
---|
30 |
|
---|
31 | newline linethickness 2 linetype dashed pts 0 0 .5 .5
|
---|
32 | copycurve pts 0 1.5 .5 2
|
---|
33 | copycurve pts 1.5 0 2.0 .5
|
---|
34 | copycurve pts 1.5 1.5 2 2
|
---|
35 | label fontsize 12 : Dimension 2 links
|
---|
36 |
|
---|
37 |
|
---|
38 | (* Now draw the nodes with fill 0 so that they will draw white over the
|
---|
39 | * link overlap *)
|
---|
40 |
|
---|
41 | newcurve pts
|
---|
42 | 0 0
|
---|
43 | 0 1.5
|
---|
44 | 1.5 0
|
---|
45 | 1.5 1.5
|
---|
46 | marksize .35
|
---|
47 | marktype circle
|
---|
48 | fill 1
|
---|
49 | newcurve pts
|
---|
50 | .5 .5
|
---|
51 | .5 2
|
---|
52 | 2 .5
|
---|
53 | 2 2
|
---|
54 | marksize .27
|
---|
55 | marktype circle
|
---|
56 | fill 1
|
---|
57 |
|
---|
58 | (* Now draw the node labels inside the nodes *)
|
---|
59 |
|
---|
60 | newstring x 0 y 0 fontsize 12 hjc vjc : 000
|
---|
61 | copystring x 1.5 y 0 : 001
|
---|
62 | copystring x 0 y 1.5 : 010
|
---|
63 | copystring x 1.5 y 1.5 : 011
|
---|
64 |
|
---|
65 | copystring x 0.5 y 0.5 fontsize 10 : 100
|
---|
66 | copystring x 2.0 y 0.5 : 101
|
---|
67 | copystring x 0.5 y 2.0 : 110
|
---|
68 | copystring x 2.0 y 2.0 : 111
|
---|
69 |
|
---|
70 |
|
---|