File: cube.jgr

package info (click to toggle)
jgraph 83-20
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 628 kB
  • ctags: 445
  • sloc: ansic: 4,728; makefile: 186; sh: 106; awk: 104
file content (35 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(* Drawing of the hypercube:  
   Dimensions = 1.25 * 2.55 *)

newgraph 
xaxis min 0 max 1.25 size 1.25 nodraw
yaxis min -0.30 max 2.25 size 2.55 nodraw

(* Legs *)
newline poly pfill 0 pts
  0.50  0.00   0.75  0.00   0.75 -0.20   0.50 -0.20
copycurve pts
  0.75 -0.20   1.20 -0.30   1.23 -0.28   0.75 -0.10
copycurve pts
  0.50 -0.20   0.05 -0.30   0.02 -0.28   0.50 -0.10
copycurve pts
  0.75 -0.05   1.20  0.03   1.23  0.02   0.75 -0.13
copycurve pts
  0.50 -0.05   0.05  0.03   0.02  0.02   0.50 -0.13

(* Box *)
newline poly pfill 1 pts
  0.00 0.00   1.00 0.00   1.00 2.00   0.00 2.00   
copycurve pfill .80 pts
  0.00 2.00   0.25 2.20   1.25 2.20   1.00 2.00
copycurve pfill .9 pts
  1.00 2.00   1.25 2.20   1.25 0.25   1.00 0.00


newline poly pfill 0 pts
  0.60 0.70   0.60 1.80   0.90 1.80   0.90 0.70

newcurve marktype box marksize .03 .08 fill 1 pts
  shell : awk ' BEGIN { for (i = 0.65; i < 0.90; i += 0.05) {\
                          for (j = 0.80; j < 1.70; j += 0.15) {\
                            printf("%f %f\n", i, j); } } }'