source: CGBLisp/examples/parallelogram.macsyma-batch@ 1

Last change on this file since 1 was 1, checked in by Marek Rychlik, 15 years ago

First import of a version circa 1997.

File size: 1.6 KB
Line 
1(D1) /dept3/rychlik/LISP/CGB2/EXAMPLES/parallelogram.macsyma-batch
2(C2) BATCH(PARALLELOGRAM);
3
4
5(C3) if get('geometry,'version)=false then load(geometry);
6Batching the file /dept3/rychlik/lisp/cgb2/examples/geometry.macsyma
7Batchload done.
8(D3) /dept3/rychlik/lisp/cgb2/examples/geometry.macsyma
9
10
11(C4) ginit();
12(D4) 1
13
14
15
16(C5) gpoints(A,B,C,D,M1,M2,P,Q,R);
17(D5) [[X1, Y1], [X1, Y1, X2, Y2], [X1, Y1, X2, Y2, X3, Y3],
18
19[X1, Y1, X2, Y2, X3, Y3, X4, Y4], [X1, Y1, X2, Y2, X3, Y3, X4, Y4, X5, Y5],
20
21[X1, Y1, X2, Y2, X3, Y3, X4, Y4, X5, Y5, X6, Y6],
22
23[X1, Y1, X2, Y2, X3, Y3, X4, Y4, X5, Y5, X6, Y6, X7, Y7],
24
25[X1, Y1, X2, Y2, X3, Y3, X4, Y4, X5, Y5, X6, Y6, X7, Y7, X8, Y8],
26
27[X1, Y1, X2, Y2, X3, Y3, X4, Y4, X5, Y5, X6, Y6, X7, Y7, X8, Y8, X9, Y9]]
28
29(C6) /* Declare points */
30garbitrary(A,B,C);
31(D6) [[X1, Y1], [X1, Y1, X2, Y2], [X1, Y1, X2, Y2, X3, Y3]]
32
33(C7) /* Declare arbitrary points */
34
35/* Geometrical hypotheses */
36parallel(A,B,C,D);
37/usr/export/home/macsyma/share/determ.o being loaded.
38(D7) []
39
40
41(C8) parallel(A,C,B,D);
42(D8) []
43
44
45(C9) midpoint(M1,A,C);
46(D9) [2 X5 - X3 - X1, 2 Y5 - Y3 - Y1]
47
48
49(C10) midpoint(M2,B,D);
50(D10) [2 X5 - X3 - X1, 2 Y5 - Y3 - Y1, 2 X6 - X4 - X2, 2 Y6 - Y4 - Y2]
51
52
53(C11) ghypot();
54(D11) []
55
56
57
58(C12) /* Geometrical conclusions */
59identical(M1,M2);
60(D12) [X5 - X6, Y5 - Y6]
61
62
63(C13) gconcl();
64(D13) []
65
66
67
68(C14) /* Generate ideal */
69gideal();
70(D14) [2 X5 - X3 - X1, 2 Y5 - Y3 - Y1, 2 X6 - X4 - X2, 2 Y6 - Y4 - Y2,
71
72 1 - U1 (X5 - X6), 1 - U2 (Y5 - Y6)]
73
74(D15) DONE
75(C16) CLOSEFILE();
76
Note: See TracBrowser for help on using the repository browser.