summaryrefslogtreecommitdiff
path: root/app/eudas/4.3/doc/abb.9-4
blob: e243265bc8d28655e5ed3b7d102d801a02063323 (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
init dgs; 
window (0.0, 0.0, 13.5, 6.0); viewport (0.0,0.0,13.5,6.0);
(*scale (1.7,1.7, 0.0,0.0);*)
(*clear pixels;*)
 
kasten (2.0, 1.0, 1.4, 2.0); 
kasten (3.5, 1.0, 1.4, 2.0); 
kasten (6.5, 1.0, 1.4, 2.0); 
kasten (2.0, 3.4, 1.4, 2.0); 
kasten (5.0, 3.4, 1.4, 2.0); 
kasten (6.5, 3.4, 1.4, 2.0); 
  strichel (3.5, 3.4, 3.5, 5.4); 
  strichel (3.5, 5.4, 4.9, 5.4); 
  strichel (4.9, 5.4, 4.9, 3.4); 
  strichel (4.9, 3.4, 3.5, 3.4); 
move (1.9, 2.7); draw (1.5, 2.7); 
draw (1.5, 4.6); draw (1.9, 4.6);
 
x alignment (center); 
font size (0.3); font expansion (1.4); 
 
move (2.7, 5.6); draw ("22-1"); 
move (2.7, 4.9); draw ("X"); 
move (2.7, 4.4); draw ("K"); 
move (2.7, 2.5); draw ("K"); 
move (2.7, 2.0); draw ("N1"); 
move (2.7, 0.4); draw ("(114)"); 
 
move (4.2, 5.6); draw ("22-2"); 
move (4.2, 4.9); draw ("X"); 
move (4.2, 4.4); draw ("K"); 
move (4.2, 2.5); draw ("K"); 
move (4.2, 2.0); draw ("N2"); 
move (4.2, 0.4); draw ("(209)"); 
 
move (5.7, 5.6); draw ("23-1"); 
move (5.7, 4.9); draw ("Y"); 
move (5.7, 4.4); draw ("L"); 
 
move (7.2, 5.6); draw ("24-1"); 
move (7.2, 4.9); draw ("Z"); 
move (7.2, 4.4); draw ("M"); 
move (7.2, 2.5); draw ("M"); 
move (7.2, 0.4); draw ("(17)"); 
 
font size (0.4); x alignment (normal);
move (8.5, 2.0); draw ("Koppeldatei"); 
move (8.5, 4.4); draw ("Hauptdatei"); 
 
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-4";
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)
*)