source: trunk/Jgraph/hypercube.jgr@ 455

Last change on this file since 455 was 418, checked in by Nicholas Riley, 17 years ago

Jgraph 8.3 from http://www.cs.utk.edu/~plank/plank/jgraph/jgraph.tar.gz

File size: 1.5 KB
Line 
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
10Y 2.3
11newgraph
12xaxis size 2.5 min 0 max 2.5 nodraw
13yaxis size 2 min 0 max 2 nodraw
14legend 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
19newline linethickness 2 pts 0 0 1.5 0
20copycurve pts 0 1.5 1.5 1.5
21copycurve pts .5 .5 2.0 .5
22copycurve pts 2 2 .5 2
23 label fontsize 12 : Dimension 0 links
24
25newline linethickness 2 linetype dotted pts 0 0 0 1.5
26copycurve pts 1.5 0 1.5 1.5
27copycurve pts .5 .5 .5 2.0
28copycurve pts 2 2 2 .5
29 label fontsize 12 : Dimension 1 links
30
31newline linethickness 2 linetype dashed pts 0 0 .5 .5
32copycurve pts 0 1.5 .5 2
33copycurve pts 1.5 0 2.0 .5
34copycurve 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
41newcurve 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
49newcurve 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
60newstring x 0 y 0 fontsize 12 hjc vjc : 000
61copystring x 1.5 y 0 : 001
62copystring x 0 y 1.5 : 010
63copystring x 1.5 y 1.5 : 011
64
65copystring x 0.5 y 0.5 fontsize 10 : 100
66copystring x 2.0 y 0.5 : 101
67copystring x 0.5 y 2.0 : 110
68copystring x 2.0 y 2.0 : 111
69
70
Note: See TracBrowser for help on using the repository browser.