home *** CD-ROM | disk | FTP | other *** search
-
-
- (*******************************************************************)
- (* *)
- (* Math22. Graphics and explanations of Pythagoras Theorem, *)
- (* right triangles, and topics which arise from them. This is *)
- (* Program #1 of Group #2 of the Foundations of Mathematics *)
- (* Series. Robert G. Hoffmann Sept 1985. *)
- (* *)
- (*******************************************************************)
-
- Program PythTheorem;
-
- Var Xlow,Yhi,Vlen,Hlen,I,J,val : Integer; (* Box locator and lengths.*)
- ex,gd,ch,zh : Char;
- Ccontrol : File;
- {========================================================================}
- Procedure key;
- Begin
- Gotoxy(30,25); Write('Press any key');
- Read(Kbd,gd); If gd='' then key;
- Gotoxy(10,25); For I:=1 to 40 do Write(#32);
-
- end; (* Procedure key. *)
- {-------------------------------------------------------------------}
- Procedure Out; (* Deletes line in Hires. Delline louses up screen.*)
- Begin For J:=1 to 70 do write(#32);
- end;
- (*******************************************************************)
- (* *)
- (* Explanations of Trig foundations in this Procedure. *)
- (* *)
- (*******************************************************************)
- Procedure Boxes; Forward;
- Procedure Triangles;
-
- Var X1,X2,X3,Y1,Y2,Y3 : Integer;
-
- {===================================================================}
-
- Begin Hires;
- Writeln(' Trigonometry Definitions ');
- Write(' ~~~~~~~~~~~~~~~~~~~~~~~~ ');
-
- Gotoxy(37,6); Write(#224);
- X1:=120; Y1:= 45;
- X2:=200; Y2:= 40;
- Draw(X1,Y1,X2,Y2,1); (* Left triangle.*)
- Draw(X1,Y1,X2,Y1,1);
- Draw(X2,Y1,X2,Y2,1);
- X1:=270; Y1:= 48;
- X2:=330; Y2:= 18;
- Draw(X1,Y1,X2,Y2,1); (* Middle triangle.*)
- Draw(X1,Y1,X2,Y1,1);
- Draw(X2,Y1,X2,Y2,1);
- X1:=410; Y1:= 45;
- X2:=420; Y2:= 5;
- Draw(X1,Y1,X2,Y2,1); (* Right triangle.*)
- Draw(X1,Y1,X2,Y1,1);
- Draw(X2,Y1,X2,Y2,1);
- Gotoxy(1,9);
- Writeln(' Above are 3 right triangles. Different shapes result from ');
- Writeln(' different side lengths. The lower angle is identified by ');
- Writeln(' ',#224,' (Greek letter Alpha), which helps describe shapes too.');
- Writeln(' Small angle, flat triangle; big angle, tall triangle. ');
- Key;
- Gotoxy(1,14);
- Writeln(' For now, consider clumsy definitions of their side-length ');
- Writeln(' ratios - as given in books on trigonometry basics. ');
- Key;
- For I:= 1 to 7 do begin
- Gotoxy(1,8+I); Out;
- end;
- Gotoxy( 2,11); Write('hyp');
- Gotoxy(12,12); Write('opp');
- Gotoxy( 5,15); Write('adj');
- Gotoxy( 5,13); Write(#224);
- X1:= 8; Y1:=107;
- X2:=74; Y2:= 71;
- Draw(X1,Y1,X2,Y2,1);
- Draw(X1,Y1,X2,Y1,1);
- Draw(X2,Y1,X2,Y2,1);
-
- Gotoxy(18,11);Write(' Hypotenuse (hyp) is the long side of the triangle. ');
- Gotoxy(18,12);Write(' Adjacent (adj) is the side nearest the angle ',#224,'.');
- Gotoxy(18,13);Write(' Opposite (opp) is the side opposite the angle ',#224,'.');
- Key;
- Gotoxy(16,15);Write(' Ratios of pairs of side lengths are formed which are: ');
- Gotoxy(16,16);Write(' the Sine, Cosine, and Tangent of the angle Alpha. ');
- Key;
- Gotoxy(16,18);Write(' We don`t show the ratio definitions first given in ');
- Gotoxy(16,19);Write(' textbooks. We give `more advanced` ones. They are ');
- Gotoxy(16,20);Write(' easier to understand and relate to other things! ');
- Gotoxy(16,21);Write(' Here they are: ');
- Gotoxy(16,22);Write(' -------------- ');
- Key;
- For I:=1 to 12 do begin
- Gotoxy(16,10+I); For J:= 1 to 60 do Write(#32);
- end;
- Gotoxy(16, 9);Write(' Consider the triangle drawn on rectangular ');
- Gotoxy(16,10);Write(' coordinates. We will then have: ');
- Gotoxy(16,11);Write(' -------------------------------- ');
- Key;
- Gotoxy(2,11); Write(' '); Gotoxy(12,12); Write(' ');
-
- Y2:=64; X2:=106;
- Draw(X1,Y1,X1,Y2,1);
- Draw(X1,Y1,X2,Y1,1);
- Gotoxy(10,12); Write('y'); Gotoxy(5,15); Write(' ');
- Gotoxy( 7,14); Write('x');
- Gotoxy(5,11); Write('r');
- Key;
- Gotoxy(16,12);Write(' For the angle Alpha, these ratios are defined: ');
- Gotoxy(16,14);Write(' Sin = y/r Cos = x/r Tan = y/x ');
- Key;
- Gotoxy(16,16);Write(' Draw the diagram so that r = 1, then: ');
- Key;
- Gotoxy(5,11);Write('1');
- Gotoxy(16,14);Write(' Sin = y Cos = x Tan = y/x. ');
- Key;
- Gotoxy(16,16);Write('And, thanks to Pythagoras`s theorem, we also have: ');
- Gotoxy(16,18);Write(' 1 = y',ex,' + x',ex,' and 1 = sin',ex,' + cos',ex,'.');
- Gotoxy(16,19);Write(' ----------- --------------- ');
- Key;
- Gotoxy(12,20);Write(' If we let Alpha range from 0 to 90 degrees (r = 1), then ');
- Key;
- Gotoxy(16,21);Write(' 1. The sin and cos values range from 0 to 1. As ');
- Gotoxy(16,22);Write(' one goes up, the other goes down. ');
- Gotoxy(16,23);Write(' 2. The tan values range from 0 to infinity. ');
- Gotoxy(16,24);Write(' ------------------------------------------- ');
- Key;
- Gotoxy(1,1); For I:=1 to 9 do Out;
- Xlow:=10; Yhi:=1;
- Hlen:=59; Vlen:=5; Boxes;
-
- Gotoxy(12,3);Write(' Now shown on the screen are Foundations of Trigonometry. ');
- Gotoxy(12,4);Write(' These relationships open the door to map making and loc- ');
- Gotoxy(12,5);Write(' ating things on them. Learn to make your own maps too. ');
- Gotoxy(12,6);Write(' Learn to make them of space - and of time. ');
- Key;
-
- end; (* Procedure Triangles.*)
- {-------------------------------------------------------------------}
- Procedure MainControl; Forward;
- Procedure Whereto;
- Begin
- If ch='5' then begin
- Gotoxy(28,25); Write('Press `M` for Menu.');
- end;
- If ch<>'5' then begin
- Gotoxy(15,25);
- Write(' Press `N` for next topic, `M` for Menu. ');
- end;
- Repeat
- Read(Kbd,zh);
- zh:=upcase(zh);
- until (zh IN ['N','M']);
- If zh='M' then MainControl;
- end; (* Procedure Whereto *)
-
- {------------------------------------------------------------------------}
- Procedure Boxes;
- (* Box drawing procedure. Define by upper left corner and
- lengths of horizontal and vertical lines. Xlow,Yhi
- and lengths input just before Boxes call. *)
- Begin
-
- Gotoxy(Xlow, Yhi); Write(#218); (* Position upper left corner. *)
- For I:=1 to Hlen do begin (* Write top line and corners. *)
- Write(#196);
- end;
- Write(#191);
-
- Xlow:=Xlow+Hlen+1; (* X is same for vertical. *)
- For I:=1 to Vlen do begin (* Write R vertical and corner.*)
- Yhi:=Yhi+1;
- Gotoxy(Xlow, Yhi);
- Write(#179);
- end;
- Gotoxy(Xlow, Yhi+1); Write(#217);
-
- Yhi:=Yhi+1;
- For I:=1 to Hlen do begin (* Y same for horizontal.*)
- Xlow:=Xlow-1;
- Gotoxy(Xlow, Yhi);
- Write(#196);
- end;
- Gotoxy(Xlow-1, Yhi); Write(#192);
-
- Xlow:=Xlow-1; (* X same for vertical. *)
- For I:=1 to Vlen do begin
- Yhi:=Yhi-1;
- Gotoxy(Xlow, Yhi);
- Write(#179);
- end;
- end; (* Procedure Boxes. *)
- {---------------------------------------------------------------------}
-
- Procedure Circles;
-
- (* This draws nice circles, or arcs of them. You must specify
- the center (Xc,Yc) and other obvious things. Remember that you
- are in HiRes too!
- *)
- Var Np,Xc,Yc,I,X,Y : Integer;
- Yr,Xr,Scale,Xrange,Yrange,A : Real;
-
-
- {===================================================================}
- Begin
-
- A:=0; Np:=200; Xrange:=106; Yrange:=54; Xc:=224; Yc:=76;
-
- Scale:=2*Pi/(Np); (* 2Pi/Np makes FULL CIRCLE. *)
- (* Change as wanted. *)
- For I:= 1 to Np+1 do begin
-
- Xr:=Round(Cos( A)*Xrange + Xc); X:=Trunc(Xr);
- Yr:=Round(Sin(-A)*Yrange + Yc); Y:=Trunc(Yr);
- A:=A+Scale;
- Plot(X,Y,1);
- end;
- end; (* Procedure Circles. *)
-
- {---------------------------------------------------------------------}
- (********************************************************************)
- (* *)
- (* This is orientation material. For the novice in mathematics, *)
- (* it explains how we approach developing modules of the founda- *)
- (* tions of mathematics. For those familiar with mathematics, *)
- (* it shows how the subject matter can be presented clearly and *)
- (* simply, I hope. *)
- (* *)
- (********************************************************************)
- Procedure Approach;
-
- Begin Clrscr; ex:=#253;
-
- Gotoxy(1,3);
- Writeln(' A Reminder about Equations. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' In the program Math21, we saw that an equation is the ');
- Writeln(' `communicating unit` in mathematics. ');
- Writeln;
- Writeln(' We also saw that both sides of an equation have the ');
- Writeln(' same value. We make them that way. ');
- Writeln;
- Writeln(' However, we may write anything, and say that both sides ');
- Writeln(' have the same value. But is it true? ');
- Key;Gotoxy(1,14);
- Writeln(' So demonstrating the truth of mathematical expressions, ');
- Writeln(' (equations) is a vital and interesting part of math. ');
- Writeln;
- Writeln(' We introduce the subjects of demonstrations and trian- ');
- Writeln(' gles with a cornerstone expression of the foundations ');
- Writeln(' of mathematics: ');
- Writeln;
- Writeln(' The Theorem of Pythagoras. ');
- Writeln(' -------------------------- ');
- Key;Clrscr;
-
- Gotoxy(1,6);
- Writeln(' The Theorem of Pythagoras');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~');
- Gotoxy(1,9);
- Writeln(' Pythagoras`s theorem is at the heart of the foundations ');
- Writeln(' of mathematics. Here it is in words: ');
- Writeln;
- Writeln;
- Writeln(' For ANY right triangle, the square of ');
- Writeln(' the longest side equals the sum of the ');
- Writeln(' squares of the 2 shorter sides. ');
- Xlow:=18; Hlen:=40;
- Yhi:=12; Vlen:= 3;
- Boxes;
- Key;
- Gotoxy(1,18);
- Writeln(' We want to demonstrate the truth of this. ');
- Writeln(' We want to learn how to approach similar relationships too.');
- Writeln(' What shall we do? ');
- Key;
- Gotoxy(1,1); for I:=1 to 11 do Delline;
- Gotoxy(1,11);
-
- Writeln(' Common sense is to start with known truths. Things ');
- Writeln(' obviously true, or their truth has been verified ');
- Writeln(' previously. Put together known truths, and we can ');
- Writeln(' see other truths - sometimes. That`s what we do! ');
- Key;
- Gotoxy(1,16);
- Writeln(' ===> We need just 2 simple facts. They are: <=== ');
- Writeln;
- Writeln(' 1. Any number can be written as the sum of 2 smaller ');
- Writeln(' numbers. We may square their sum too. ');
- Key;
- Gotoxy(1,20);
- Writeln;
- Writeln(' 2. The area of a square (or rectangle) can be divided ');
- Writeln(' exactly in half with a diagonal through opposite ');
- Writeln(' corners. Two right triangles are thus formed. ');
- Gotoxy(15,24); For I:=1 to 48 do Write(#196);
- Key;
- Gotoxy(1,1); For I:=1 to 17 do Delline;
- Gotoxy(1,9);
-
- Writeln(' The first truth in symbols and numbers. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Key;
- Gotoxy(1,11);
- Write(' (a + b)',ex,' = a',ex,' + 2ab + b',ex);
- Writeln(' (3 + 2)',ex,' = 3',ex,' + 2x3x2 + 2',ex);
- Writeln(' = 9 + 12 + 4. ');
- Writeln(' = 25. ');
- Key;
- Gotoxy(1,15);
- Writeln(' A picture example of the second truth. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Key;
-
- Xlow:=20; Yhi:=17; (* Draw square of 9. *)
- Hlen:=11; Vlen:=5; Boxes;
-
- Gotoxy(21,19); for I:=1 to 11 do Write(#196);
- Gotoxy(21,21); for I:=1 to 11 do Write(#196);
- For I:= 1 to 5 do begin
- Gotoxy(24,17+i); Write(#179);
- Gotoxy(28,17+i); Write(#179);
- end;
- For I:=1 to 7 do begin
- Gotoxy(18+i*2,24-i); Write(#250);
- end;
- Key;
- Gotoxy(38,18);Write('We use numbers for lengths ');
- Gotoxy(38,19);Write('and squares. YOU must keep ');
- Gotoxy(38,20);Write('track of how you use them. ');
- Gotoxy(38,21);Write('Lines are sides of squares. ');
- Key;
- Gotoxy(38,18);
- Write('A square of Symbols ');
- Gotoxy(38,19);
- Write('~~~~~~~~~~~ ~~~~~~~ ');
- Gotoxy(38,20);
- Write(' Sides = 3 a ');
- Gotoxy(38,21);
- Write(' Area = 9 a',ex,' ');
- Gotoxy(35,22);
- Write('Triangles = 4 1/2 (1/2)a',ex,' ');
-
- Whereto; (* Where to next? *)
- ch:='2';
- end; (* Procedure Approach. *)
-
- {---------------------------------------------------------------------}
- Procedure PythagGraf;
-
- Begin
- Hires; ex:=#253;
-
- Gotoxy(25, 1); Write(' ************************* ');
- Gotoxy(25, 2); Write(' * * ');
- Gotoxy(25, 3); Write(' * The DEMONSTRATION * ');
- Gotoxy(25, 4); Write(' * * ');
- Gotoxy(25, 5); Write(' ************************* ');
- Gotoxy(25, 7); Write(' Here is how we proceed: ');
- Key;
- Gotoxy(25, 7); Write(' Draw 2 IDENTICAL squares. ');
-
- Xlow:=1; Hlen:=20; (* Upper Square *)
- Yhi:=1; Vlen:=9;
- Boxes;
-
- Xlow:=1; Hlen:=20; (* Lower Square *)
- Yhi:=13; Vlen:=9;
- Boxes;
- Key;
- Gotoxy(25, 7); Write(' Divide the upper square into 2 rectangles ');
- Gotoxy(25, 8); Write(' and 2 small squares according to: ');
-
- Gotoxy(25,10); Write(' (a + b)',ex,' = a',ex,' + 2ab + b',ex);
- Key;
-
- Draw( 6,60,168,60,1); (* Horizontal line. *)
- Draw(116,84,116, 4,1); (* Vertical line. *)
-
- Gotoxy(1,5); Write('a'); (* Label lines. *)
- Gotoxy(1,10); Write('b');
- Gotoxy(8,11); Write('a');
- Gotoxy(19,11);Write('b');
- Gotoxy( 8, 5); Write('a',#253);
- Gotoxy(18,10); Write('b',#253);
- Key;
-
- Gotoxy(28,12);Write(' Sides of the upper square are divided ');
- Gotoxy(28,13);Write(' into lengths a and b. In the lower ');
- Gotoxy(28,14);Write(' square, we divide them into the same ');
- Gotoxy(28,15);Write(' lengths, but now make triangles. ');
- Key;
-
- {---------------------------------------------------------------}
- Gotoxy(1,16); Write('a'); (* Label side line.*)
- Gotoxy(1,22); Write('b');
- Gotoxy(8,23); Write('a');
- Gotoxy(19,23);Write('b');
-
- Draw(1 ,156, 7,156,1); (* Mark dividing points.*)
- Draw(116,178,116,182,1);
- Key;
- Draw(1 ,156,116,180,1); (* Draw first triangle.*)
- Draw(116,180,170,121,1); (* Draw second triangle.*)
-
- Gotoxy(22,20); Write('a');
- Gotoxy(22,14); Write('b');
- Key;
- Draw(170,121, 54,100,1);
- Draw( 54,100, 1,156,1);
- Key;
- Gotoxy(8 ,21); Write('c');
- Gotoxy(17,20); Write('c');
- Gotoxy(11,18); Write('c',#253);
- Key;
- Draw(116,60,170, 4,1); (* Draw diagonals,top rectangle.*)
- Gotoxy(18, 5); Write('c');
- Draw( 6,83,116,60,1);
- Gotoxy( 8, 9); Write('c');
- Key;
-
- Gotoxy(25,12); Write(' The triangles in both squares are identical! ');
- Gotoxy(25,13); Write(' In the upper square there are 4 (2 triangles ');
- Gotoxy(25,14); Write(' make 1 rectangle). In the lower square there ');
- Gotoxy(25,15); Write(' are 4 triangles too. So we have: ');
- Key;
- Gotoxy(25,17); Write(' Upper Square Lower Square ');
- Gotoxy(25,18); Write(' ~~~~~~~~~~~~ ~~~~~~~~~~~~ ');
- Gotoxy(25,19); Write(' a',ex,' + b',ex,' + 2ab = ');
- Gotoxy(52,19); Write('4(',#171,')ab + c',ex );
- Key;
- Gotoxy(25,21); Write(' We have 2ab on both sides, so subtract it out for:');
- Key;
- Gotoxy(40,23); Write('a',ex,' + b',ex,' = c',ex,' Is true! ');
-
- Gotoxy(40,24); For I:=1 to 25 do Write(#196);
- Key;
- Gotoxy(25,2); For I:=1 to 50 do Write(#32);
- Gotoxy(25,3); Write(' Remember this vital fact too: ' );
- Gotoxy(25,4); Write(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' );
- Gotoxy(25,5); Write(' Pythagoras`s theorem relates the squares of ' );
- Gotoxy(25,6); Write(' a, b, and c. If we know any 2 of them, just ' );
- Gotoxy(25,7); Write(' `solve the equation` to get the third. ');
- Xlow:=27; Hlen:=45;
- Yhi:= 1; Vlen:= 6;
- Boxes;
- Key;
- Whereto; (* Whereto next? *)
- ch:='3';
- end; (* Procedure PythagGraf. *)
- {-------------------------------------------------------------------}
-
- (*******************************************************************)
- (* *)
- (* This is the last part of Program Math21. The material here is *)
- (* intended to provide "hooks" to other portions of mathematics. *)
- (* I plan to write at least some of these programs. I hope that *)
- (* others will write them, and additional programs, too. *)
- (* *)
- (*******************************************************************)
- Procedure Hooks;
-
- Begin Textmode(2);
- Clrscr; (* Transition page.*)
- Gotoxy(1,5);
-
- Writeln(' (*************************************) ');
- Writeln(' (* *) ');
- Writeln(' (* WHAT CAN WE DO WITH TRIANGLES *) ');
- Writeln(' (* *) ');
- Writeln(' (* and *) ');
- Writeln(' (* *) ');
- Writeln(' (* c',ex,' = a',ex,' + b',ex,' ? *) ');
- Writeln(' (* *) ');
- Writeln(' (*************************************) ');
-
- Gotoxy(25,17); Write('Press any key to find out! ');
- Repeat Read(Kbd,ch); until Keypressed=false;
-
- {----------------------------------------------------------------}
- Clrscr;
- Gotoxy(1, 3);
- Writeln(' Uses of right triangles and Pythagoras`s theorem are ');
- Writeln(' so numerous, we sketch only a few of them. ');
- Writeln(' Here they are: ');
- Writeln(' ~~~~~~~~~~~~~~ ');
- Key;
- Gotoxy(1, 8);
- Writeln(' 1. All straight-sided shapes, no matter how many ');
- Writeln(' sides, can be constructed from them. ');
- Writeln;
- Writeln(' 2. Given any figure with straight sides, it can ');
- Writeln(' be divided into pieces with right triangles. ');
- Writeln;
- Key;
- Gotoxy(1,14);
- Writeln(' 3. Circles and other curves can be generated with ');
- Writeln(' the aid of right triangles. ');
- Writeln;
- Writeln(' 4. Right triangles are the base of the branch of ');
- Writeln(' mathematics we call `trigonometry.` ');
- Writeln;
- Key;
- Gotoxy(1,20);
- Writeln(' 5. We describe motion and time with the above. ');
- Writeln;
- Writeln(' Quite a lot of stuff, huh? ');
- Writeln(' -------------------------- ');
- Key;
- Clrscr;
- Gotoxy(1, 6);
- Writeln(' Shortly we will see how to do some of this. But ');
- Writeln(' before looking at it, here is how to simplify the ');
- Writeln(' equation. Use it for other things too. ');
- Key;
- Gotoxy(12,11);
- Writeln(' To simplify c',ex,' = a',ex,' + b',ex,', divide both sides by c',ex,'.');
- Key;
- Gotoxy(12,14);
- Write(' We obtain: 1 = A',ex,' + B',ex,'. ');
- Gotoxy(42,14);
- Write('[A',ex,' is a',ex,'/c',ex,', B',ex,' is b',ex,'/c',ex,']. ');
- Key;
- Gotoxy(1,17);
- Writeln(' The number 1 is easy to work with, and ');
- Writeln(' we can change back anytime. ');
- Writeln(' --------------------------- ');
- Key;
- Triangles; (* Triangles has much Hooks material too.*)
- Whereto;
- Ch:='4';
- end; (* Procedure Hooks. *)
- {-------------------------------------------------------------------}
- Procedure More; (* More material on relationships.*)
- Begin clrscr;
-
- Gotoxy(14,7);
- Writeln(' The last of our related materials are shown next. ');
- Writeln(' Some of what we have just seen will again be seen ');
- Writeln(' in a somewhat different way. ');
- Writeln;
- Writeln(' Our main figure is a big square formed from 4 ');
- Writeln(' smaller squares. Consider their center to be ');
- Writeln(' the center of a rectangular coordinate system. ');
- Writeln;
- Writeln(' Remember that mathematics is a language, and all ');
- Writeln(' things in it are related. See these relation- ');
- Writeln(' ships for the joy of learning them yourself! ');
- Xlow:=11; Yhi:=5;
- Hlen:=54; Vlen:=13; Boxes;
- Key;
- Hires;
- Gotoxy(18,1); Write('Relating Pythagoras`s Theorem to Other Topics');
-
- Xlow:=15; Hlen:=26;
- Yhi:= 3; Vlen:=13; Boxes;
-
- Gotoxy(50,4); Write(' CIRCLES and');
- Gotoxy(50,6); Write(' TRIANGLES and');
- Gotoxy(50,8); Write('SQUARES (Areas).');
- Xlow:=48; Hlen:=18;
- Yhi:= 3; Vlen:= 5; Boxes;
- Key;
- Circles;
- Draw(118,76,330,76,1); (* Coordinate axes in square.*)
- Draw(224,22,224,130,1);
-
- Draw(224,76,330,76,1); (* Make first triangle.*)
- Draw(224,76,300,40,1);
- Gotoxy(33,7); Write('1'); (* Make radius = 1.*)
- Gotoxy(33,9); Write(#224);
- Key;
- Gotoxy(46,11);Write(' All circles area = ',#227,'r',#253 );
- Gotoxy(46,12);Write(' This circles area = ',#227' = 3.14..');
- Gotoxy(46,13);Write(' Big square area = 4 ');
- Key;
- Gotoxy(14,19);Write(' Study carefully the relationships now shown. We have ');
- Gotoxy(14,20);Write(' areas of circles and squares. Triangles coming next. ');
- Key;
- Draw(300,40,300,76,1);
- Draw(300,76,300,88,1); (* Extend side to unit length.*)
- Draw(300,40,330,76,1); (* Add chord for another triangle.*)
- Key;
- Gotoxy(33,10); Write('cos');
- Gotoxy(37, 8); Write('sin');
-
- Gotoxy(46,15);Write(' Big triangle area = (',#171,')yx ');
- Gotoxy(46,16);Write(' = (',#171,')Sin',#224,'Cos',#224 );
- Key;
- Gotoxy(14,19);Write(' A small triangle has been added (1 side common with big ');
- Gotoxy(14,20);Write(' one). Bottom length = 1-x, or 1-cos. YOU work out its ');
- Gotoxy(14,21);Write(' area. Big+small = close to area of pie-slice of circle. ');
- Key;
- Gotoxy(14,23);Write(' To conclude our demonstrations, here is a suggestion: ');
- Key;
- Xlow:= 8; Yhi:=18;
- Hlen:=66; Vlen:= 6; Boxes;
-
- Gotoxy(10,19);Write(' Make a mechanical model of what you see above. ');
- Gotoxy(10,20);Write(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Gotoxy(10,21);Write(' Rotate the circle to see Alpha change, the side lengths change, ');
- Gotoxy(10,22);Write(' and their ratios change. 1 = y',#253,' + x',#253,' is true for all. Use a ');
- Gotoxy(10,23);Write(' toy clock face for mechanical parts. Experiment with tracing ');
- Gotoxy(10,24);Write(' paper center-pinned to a drawing. Bring life to your math! ');
-
- Whereto; (* WhereTo next? *);
- ch:='5';
- end; (* Procedure More. *)
- {-------------------------------------------------------------------}
-
- Procedure Comment;
- Begin Clrscr;
- Gotoxy(1,2);
- Writeln(' Comments and References. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' For those who want to go further in the study of mathematics ');
- Writeln(' or science, the following books are recommended. Barnes & ');
- Writeln(' Noble is a division of Harper & Row, Publishers. Order from ');
- Writeln(' any bookstore. ');
- Writeln;
- Writeln(' Barnes & Noble Thesaurus of Science. ');
- Writeln(' Barnes & Noble Thesaurus of Physics. ');
- Writeln(' Barnes & Nobel Thesaurus of Chemistry. ');
- Writeln(' Barnes & Nobel Thesaurus of Biology. ');
- Writeln(' Barnes & Nobel Thesaurus of Geology. ');
- Writeln(' Barnes & Nobel Thesaurus of Computer Science. ');
- Writeln;
- Writeln(' The above books have the contents of profusely illustrated science ');
- Writeln(' dictionaries. The alphabetical ordering of entries in dictionaries, ');
- Writeln(' however, destroys much of the value of their contents. Unrelated ');
- Writeln(' topics are grouped together. But the new Barnes & Nobel books are ');
- Writeln(' in thesaurus format. Related topics can thus be studied together. ');
- Key;
- Clrscr;
- Gotoxy(1,1);
- Writeln(' Additional useful Barnes & Nobel titles are: ');
- Writeln;
- Writeln(' Nielsen, K. Algebra: A Modern Approach. ');
- Writeln(' Nielsen, K. Modern Trigonometry. ');
- Writeln(' Oakley, C. Calculus, A Modern Approach. ');
- Writeln(' Bennett, C. College Physics. ');
- Writeln(' Bennett, C. Physics Problems and How to Solve Them. ');
- Writeln;
- Writeln(' Other useful books are: ');
- Writeln;
- Writeln(' Sawyer, W. Prelude to Mathematics. Dover Publications. ');
- Writeln(' Hutchinson, C. The Radio Amateur`s License Manual. American ');
- Writeln(' Radio Relay League. ');
- Writeln(' Kaufman & Wilson. Electronics Technology. McGraw-Hill. ');
- Writeln(' Edminister, J. Electric Circuits. McGraw-Hill. ');
- Writeln;
- Writeln(' The above titles have been winnowed from a huge number of books. ');
- Writeln(' Few truly good books have ever been written. ');
- Writeln;
- Writeln(' Addtional public-domain programs in the foundations of mathematics ');
- Writeln(' and science are being written. Why don`t you write them too? ');
- Writeln(' __________________________________________________________ ');
-
- Key;Clrscr;
- Gotoxy(20,9); Write(' End Of Program Math22 of the Series:');
- Gotoxy(20,10); Write('Foundations of Science and Mathematics.');
- Xlow:=17; Yhi:=7; Hlen:=42; Vlen:=4; Boxes;
-
- Gotoxy(20,15); Write(' The Program Math23 will cover ');
- Gotoxy(20,16); Write(' Systems of Linear Equations. ');
- Gotoxy(20,17); Write(' ---------------------------- ');
- Gotoxy(23,24);
- Write('Press `M` for Menu, `Q` to Quit.');
- Repeat
- Read(Kbd,Ch);
- Ch:=Upcase(Ch);
- until (Ch in ['M','Q']);
- If Ch='M' then MainControl;
- Halt;
-
- end;
- {-------------------------------------------------------------------}
-
- Procedure MainControl;
- Begin clrscr;
- Assign(Ccontrol,'Control.com');
-
- Gotoxy(1, 5);
- Writeln(' Foundations of Mathematics ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln;
- Writeln;
- Writeln(' TRIANGLES, the THEOREM OF PYTHAGORAS, ');
- Writeln(' ');
- Writeln(' and Their Relationships ');
-
- Gotoxy(1,13);
- Writeln; Writeln;
- Writeln(' 1 Describing our approach. 4 Beyond triangles. ');
- Writeln(' 2 Pythagoras`s Theorem. 5 Comments & references. ');
- Writeln(' 3 Triangles & other topics. ');
- Writeln(' C Control program. ');
- Writeln(' _________________________________________ ');
-
- Gotoxy(24,25); Write(' Press key for choice.');
-
- Xlow:=18; Hlen:=40;
- Yhi:= 7; Vlen:= 5; Boxes;
- Gotoxy(1,25);Write('Math22');
- Gotoxy(70,25);Write('Oct 1985');
-
- Gotoxy( 2,15); Write('I want no.');
- Repeat
- Read(Kbd,ch);
- Ch:=Upcase(Ch);
- until (Ch in ['1','2','3','4','5','C']);
- If ch='1' then Approach;
- If ch='2' then PythagGraf;
- If ch='3' then Hooks;
- If ch='4' then More;
- If ch='5' then Comment;
- If ch='C' then Execute(Ccontrol);
-
- end; (* Procedure MainControl. *)
-
- {-------------------------------------------------------------------}
- Begin ex:=#253; (* *** MAIN PROGRAM *** *)
-
- MainControl;
- Textmode(2);
- End.
-
- {===================================================================}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-