source: CGBLisp/examples/euler.macsyma@ 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.1 KB
Line 
1/* Unfinished !! */
2if get('geometry2, 'version)=false then load(geometry2);
3A:[u1,u2]; B:[u3,u4]; C:[u5,u6]; /* Vertices */
4H1:[x1,x2]; H2: [x3,x4]; H3: [x5,x6]; /* Feet of altitudes */
5M1:[x7,x8]; M2: [x9,x10]; M3: [x11,x12]; /* Midpoints */
6O1:[x13,x14]; /* Centroid */
7O2:[x15,x16]; /* Orthocenter */
8O3:[x17,x18]; /* Intersection point of altitudes */
9
10vars:listofvars([H1,H2,H3,M1,M2,M3,O1,O2,O3,v]);
11params:listofvars([A,B,C]);
12
13eqns:append(
14 midpoint(M1,B,C),
15 midpoint(M2,A,C),
16 midpoint(M3,A,B),
17 [
18 /* Hi are on the sides */
19 collinear(B,C,H1),
20 collinear(A,C,H2),
21 collinear(A,B,H3),
22 /* O3 is intersection of altitudes */
23 perpendicular(A,O3,B,C),
24 perpendicular(B,O3,A,C),
25 perpendicular(C,O3,A,B),
26 /* O2 is orthocenter */
27 perpendicular(O2,M1,B,C),
28 perpendicular(O2,M2,A,C),
29 perpendicular(O2,M3,A,B),
30 /* O1 is the centroid */
31 collinear(O1,M1,A),
32 collinear(O1,M2,B),
33 /* collinear(O1,M3,C), */
34 /* Conclusion */
35 1-v*collinear(O1,O2,O3)
36 ]
37);
38
39cover:[[[],[]]];
40
41eqns:expand(eqns);
42cover:expand(cover);
43stringout("euler.out",eqns,vars,params,cover);
44
Note: See TracBrowser for help on using the repository browser.