summaryrefslogtreecommitdiff
path: root/app/eudas/4.3/doc/abb.9-3
blob: 9b190abeb96826fec5091650cb33d75bb3108e7a (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
init dgs; 
window (0.0, 0.0, 13.5, 7.0); viewport (0.0,0.0,13.5,7.0); 
(*scale (1.7,1.7, 0.0,0.0);*)
(*clear pixels;*)
 
x alignment (center); 
font size (0.3); font expansion (1.2); 
kasten (1.5, 5.0, 2.0, 1.5); 
move (2.5, 5.9); draw ("EUDAS-"); 
move (2.5, 5.3); draw ("Datei 1"); 
move (3.5, 5.75); draw (4.0, 5.75); 
kasten (4.0, 5.0, 2.0, 1.5); 
move (5.0, 5.9); draw ("gekettete"); 
move (5.0, 5.3); draw ("Datei A"); 
move (6.0, 5.75); draw (6.5, 5.75);
kasten (6.5, 5.0, 2.0, 1.5); 
move (7.5, 5.9); draw ("gekettete"); 
move (7.5, 5.3); draw ("Datei B"); 
kasten (1.5, 2.0, 2.0, 1.5); 
move (2.5, 2.9); draw ("gekoppelte"); 
move (2.5, 2.3); draw ("Datei C");
kasten (4.0, 0.0, 2.0, 1.5); 
move (5.0, 0.9); draw ("gekoppelte"); 
move (5.0, 0.3); draw ("Datei D"); 
 
punkt (9.0, 5.75); 
punkt (9.25, 5.75); 
punkt (9.5, 5.75); 
 
strichel (1.0, 4.5, 10.0, 4.5); 
strichel (1.0, 7.0, 10.0, 7.0); 
strichel (1.0, 4.5, 1.0, 7.0); 
x alignment (right); font size (0.4);
move (10.0, 3.9); 
draw ("Hauptdatei"); 
 
punkt (2.5, 3.75); 
punkt (2.5, 4.0); 
punkt (2.5, 4.25); 
 
punkt (5.0, 1.75); 
punkt (5.0, 2.0); 
punkt (5.0, 2.25); 
punkt (5.0, 2.5); 
punkt (5.0, 2.75); 
punkt (5.0, 3.0); 
punkt (5.0, 3.25); 
punkt (5.0, 3.5); 
punkt (5.0, 3.75); 
punkt (5.0, 4.0); 
punkt (5.0, 4.25); 
 
PROC punkt (REAL CONST x pos, y pos) : 
 
  LET p size = 0.025;
  move (x pos, y pos + p size); 
  draw (x pos + p size, y pos); 
  draw (x pos, y pos - p size); 
  draw (x pos - p size, y pos); 
  draw (x pos, y pos + p size) 
 
END PROC punkt; 
 
 
PROC strichel (REAL CONST x anf, y anf, x end, y end) : 
 
  REAL VAR laenge := x end - x anf; 
  INT VAR teile := int (abstand/ 0.4); 
  REAL VAR senkrecht, verhaeltnis; 
  IF laenge <> 0.0 THEN
    verhaeltnis := (y end - y anf) / laenge; senkrecht := 1.0 
  ELSE 
    verhaeltnis := 1.0; senkrecht := 0.0 ; 
    laenge := y end - y anf
  END IF;
  laenge := laenge / (real (2 * teile + 1)); 
  INT VAR i; 
  FOR i FROM 0 UPTO teile REP 
    move (x anf + real (i + i) * laenge * senkrecht,
          y anf + verhaeltnis * real (i + i) * laenge); 
    draw (x anf + real (i + i + 1) * laenge * senkrecht,
          y anf + verhaeltnis * real (i + i + 1) * laenge) 
  END REP . 
 
abstand : 
  sqrt ((y end - y anf) * (y end - y anf) + 
        (x end - x anf) * (x end - x anf)) . 
 
END PROC strichel; 
 
PROC kasten (REAL CONST x anf, y anf, x l, y l) : 
 
  move (x anf, y anf); 
  draw (x anf, y anf + y l); 
  draw (x anf + x l, y anf + y l); 
  draw (x anf +  x l, y anf); 
  draw (x anf, y anf) 
 
END PROC kasten;
 
 
LET myname = "abb.9-3";
save pixels (myname + ".p"); 
FILE VAR f := sequential file (modify, myname + ".p"); 
to line (f, 1); insert record (f); 
write record (f, "#linefeed (0.8)#"); 
insert record (f); write record (f, myname); 
to eof (f); insert record (f); write record (f, myname); 
to line (f, 1);
(* 
pause (9000)
*)