home *** CD-ROM | disk | FTP | other *** search
- (*******************************************************************)
- (* *)
- (* Draws a `Ruler.` People can relate to rulers. They have *)
- (* scales on them; centimeters or inches. We draw straight lines *)
- (* lines and make measurements with them. We will use them in map *)
- (* map making too. Relatable foundations for linear equations! *)
- (* *)
- (*******************************************************************)
- Program LinearEquations; (**** Global Variables ****)
-
- Var
- Xlow,Yhi,Vlen, Hlen,I,Neq : Integer; (* Vert.& horiz. line lengths. *)
- Xsc,Ysc,Ty,Y1off,Y2off : Integer; (* For 80x25 scale. *)
- Vindx,Xinc,Yinc,Xwide,Yzero : Integer;
- Xhlow,Xhhi,Yhlow,Yhhi : Integer; (* Hires coordinates. *)
- Mradius,Ycept,Slope : Real; (* Y intercept & slope. *)
- Ch,Zh : Char;
- Ccontrol : File;
- {===================================================================}
- Procedure Key; Begin
- Gotoxy(27,25); Write(' Press any key ');
- Repeat until Keypressed;
- Gotoxy(26,25); Write(' ');
- end; (* Procedure Key.*)
- {---------------------------------------------------------------}
- (*******************************************************************)
- (* *)
- (* Call this at the end of each Section, or NODE. It allows you *)
- (* 1 of 3 choices: Return to Menu. Next topic. Or Quit. *)
- (* *)
- (*******************************************************************)
- Procedure MainControl; forward;
- Procedure Node; Begin
-
- Gotoxy(14,25);Write('Press `N` for next topic, `M` for Menu, `Q` to Quit.');
-
- Repeat
- Read(Kbd,ch);
- ch:=UpCase(ch);
- until (Ch IN ['M','N','Q']);
- Gotoxy(14,25);Write(' ');
-
- If (Ch='M') then MainControl;
- If (Ch='Q') then begin
- Textmode(2); Halt;
- end;
- end; (* Procedure Node. *)
- {-------------------------------------------------------------------}
- Procedure TriDraw(Xlow,Yhi,Hlen,Vlen : Integer);
-
- Var
- Xhlow,Xhhi,Yhlow,Yhhi : Integer; (* Hires coordinates. *)
- {===============================================================}
- Begin
-
- Xhlow:=8*Xlow-2; Yhhi:=8*Yhi -4; (* Compute Hi-res *)
- Xhhi:=8*Hlen+Xhlow-2; Yhlow:=8*Vlen+Yhhi; (* scale end points. *)
-
- Draw(Xhlow,Yhlow,Xhhi,Yhhi,1); (* Draws Triangle *)
- Draw(Xhlow,Yhlow,Xhhi,Yhlow,1);
- Draw(Xhhi,Yhlow,Xhhi,Yhhi,1);
- end;
- {===================================================================}
- (* Box drawing procedure. Define by upper left corner and
- lengths of horizontal and vertical lines. Xlow,Yhi
- and lengths input just before Boxes call.
- *)
- Procedure Boxes; (* Upper left corner x,y and side *)
- 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 Ruler;
- Begin Hires;
-
- Xlow:=14; Yhi:= 2; (* Axis specifications. *)
- Hlen:=48; Vlen:= 4;
- Yzero:=Yhi+Vlen;
- {-----------------------------------------------------------------}
-
- Xhlow:=8*Xlow-2; Yhhi:=8*Yhi -4; (* Compute Hi-res *)
- Xhhi:=8*Hlen+Xhlow-2; Yhlow:=8*Vlen+Yhhi; (* scale end points. *)
-
- {---------------------------------------------------------------}
- Yinc:=Yhi+1;
- Vindx:=Round(Vlen/2);
-
- Gotoxy(Xlow,Yhi); Write(#218);
- For I:=1 to Vlen-1 do begin (* Ruler left side.*)
- Gotoxy(Xlow,Yhi+I);
- Write(#179);
- end;
- Gotoxy(Xlow,Yzero); Write(#195);
- {---------------------------------------------------------------}
-
- Xwide:=Round(Hlen/2);
- Xinc:=Xlow;
-
- For I:=1 to Xwide do begin (* Write X axis.*)
- Gotoxy(Xinc+1, Yzero);
- Write(#196,#194);
- Xinc:=Xinc+2;
- end;
- Gotoxy(Xlow+Hlen,Yhi+Vlen); Write(#180);
-
- Gotoxy(Xlow,Yhi+Vlen+1); (* Write X Scale numbers.*)
- For I:= 0 to 9 do Write(I,' ');
- For I:=10 to 12 do Write(I,' ' );
- {---------------------------------------------------------------}
- Draw(Xhlow,Yhhi,Xhhi,Yhhi ,1); (* Put box around axes.*)
- Draw(Xhhi ,Yhhi,Xhhi,Yhlow,1);
- Gotoxy(Xlow+10,Yhi+2); Write(' **** An Ordinary Ruler **** ');
-
- end; (* Procedure Ruler.*)
-
- {====================================================================}
- Procedure MapsControl; Forward;
- Procedure RulerControl;
-
- Begin Clrscr; Textmode(2); (********** RULER CONTROL ************)
-
- Writeln(' [**********************************] ');
- Writeln(' [* *] ');
- Writeln(' [* Mathematics is a LANGUAGE. *] ');
- Writeln(' [* *] ');
- Writeln(' [**********************************] ');
- Writeln;
- Writeln(' Mathematics is a language, so we start by comparing it ');
- Writeln(' with everyday English. Here is a simple sentence: ');
- Writeln;
- Writeln(' The tree is tall. ');
- Writeln;
- Writeln(' These words tell us something about trees. It is a complete ');
- Writeln(' thought. We therefore say that a sentence is our basic unit ');
- Writeln(' of communication in English. Similarly, we have a basic unit ');
- Writeln(' in mathematics: ');
- Key; Gotoxy(1,18);
- Writeln(' The equation is the communication ');
- Writeln(' unit in mathematics. ');
- Xlow:=18; Yhi:=16; Hlen:=37; Vlen:=4; Boxes;
-
- Gotoxy(1,23);
- Writeln(' Now, what does this mean? ');
- Writeln(' ------------------------- ');
- Key; Clrscr;
- Gotoxy(1,1);
- Writeln(' The idea behind equations is simple - so simple that ');
- Writeln(' people tend to overlook it. Here it is: ');
- Key;Gotoxy(1,6);
- Writeln(' An Equation is a Statement that ');
- Writeln(' 2 Things have the Same Value. ');
- Gotoxy(20,4);For I:=1 to 36 do Write(#196);
- Gotoxy(20,9);For I:=1 to 36 do Write(#196);
-
- Key;Gotoxy(1,25);For I:=1 to 3 do Writeln;
- Gotoxy(1,7);
- Writeln(' Every day, we use this idea in many ways. Example: ');
- Writeln(' In United States money the dollar is the unit, and ');
- Writeln(' we have coins for quarters of dollars. So, ');
- Key;Gotoxy(1,11);
- Writeln(' One dollar equals 4 quarters. ');
- Writeln(' One dollar = 4 quarters. ');
- Writeln(' 1 = 4(.25). ');
- Writeln(' Y = X(.25). ');
- Key;Gotoxy(1,16);
- Writeln(' The first 2 statements are obvious. The third, however, ');
- Writeln(' has NO identification (units of measurement). Hence it ');
- Writeln(' is a mathematics expression: One equals 4 fourths (true). ');
- Key;Gotoxy(1,20);
- Writeln(' The last is a linear equation. It`s just a more general ');
- Writeln(' statement. In words, it says: I may use any number for ');
- Writeln(' X. When I multiply X by .25, a number I call Y results. ');
- Writeln(' I make both sides of the equation to be the same! ');
- Key;Gotoxy(1,25);For I:=1 to 10 do Writeln;
- Xlow:=9; Yhi:=15; Hlen:=58; Vlen:=5; Boxes;
-
- Gotoxy(11,15); Write(' Because of this, to BOTH SIDES of any equation we may: ');
- Key;
- Gotoxy(19,17); Write(' Add or Subtract the same amount.');
- Gotoxy(19,18); Write(' Multiply or Divide by the same amount.');
- Key;
- Gotoxy(19,20); Write(' That`s how we solve equations! ');
- Gotoxy(19,21); Write(' ------------------------------ ');
- Key;
-
-
- Clrscr; Gotoxy(1,3);
- Gotoxy(1,1);
- Writeln(' Straight Lines and Linear Equations. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' A general expression for a linear equation in 2 variables is: ');
- Writeln;
- Writeln(' a1X + b1Y + C1 = 0. ');
- Writeln;
- Writeln(' Looks awfully mathematical, doesn`t it? At present, set it ');
- Writeln(' aside, and look for straight lines in our daily lives. We use ');
- Writeln(' them constantly without being aware of it. Examples follow. ');
- Key;
- Gotoxy(1,25);Writeln; Writeln;Writeln;Writeln;
- Gotoxy (1,7);
- Writeln(' 1. Look around you. Every object you see is within your ');
- Writeln(' line-of-sight. Light comes to you in straight lines, ');
- Writeln(' approximately. Linear equations make straight lines. ');
- Key; Gotoxy(1,11);
- Writeln(' 2. Distant objects appear small, and near ones, large. So ');
- Writeln(' lines from objects to your eye form `cone-shaped patterns.` ');
- Key; Gotoxy(1,14);
- Writeln(' 3. Study a map, like one of your city or state. Maps are dra- ');
- Writeln(' wn on rectangular grids. We find places by referring to the ');
- Writeln(' grid lines, starting along sides of the map. Points are loc- ');
- Writeln(' ated by grid line intersections. Study several maps, because ');
- Writeln(' we use the same ideas in mathematics! In fact, much of mathem-');
- Writeln(' atics was invented to make maps. More about all this later. ');
- Key;Gotoxy(1,21);
- Writeln(' A ruler is the next common object we consider. With them we ');
- Writeln(' draw lines and measure things. But there is more to them too. ');
- Key;
- Ruler;
- Key;
- Gotoxy(1,10);
- Writeln(' Here is a 12 inch ruler. Never mind that the scale is outside. ');
- Writeln(' Shortly we relate it to that silly math expression - and maps. ');
- Writeln(' That`s why the scale is where it is. Now consider things about ');
- Writeln(' rulers you might not have thought about. ');
- Key; Gotoxy(1,15);
- Writeln(' The numbers for inches are just consecutive numbers. We use the ');
- Writeln(' same numbers for a centimeter-scaled ruler, with the lines closer ');
- Writeln(' together. In each inch, there are about 2.54 centimeters. ');
- Key; Gotoxy(1,10);
- Writeln(' Our ruler has a beginning point identified by zero, which is ');
- Writeln(' not shown on other rulers. The zero point is used constantly, ');
- Writeln(' however, when we measure things. ');
- For I:=1 to 6 do
- Writeln(' ');
- Key;Gotoxy(1,14);
- Writeln(' We place a ruler so that its beginning point is where we want ');
- Writeln(' it. For instance on the edge of the paper to be measured, obv- ');
- Writeln(' iously. But suppose you want to measure a circle? Where does ');
- Writeln(' it begin - and end? Or suppose you want to draw a map on the ');
- Writeln(' surface of an orange or grapefruit. Where do you put the zero ');
- Writeln(' point of the ruler? ');
- Key;Gotoxy(1,21);
- Writeln(' We now put together what we have learned about maps and rulers. ');
- Writeln(' They are called Rectangular Coordinates. On them, we draw stra- ');
- Writeln(' ight lines, and all kinds of other math expressions. ');
-
- Node;
- MapsControl;
-
- end; (* Procedure RulerControl. *)
- {===========================================================================}
- (*******************************************************************)
- (* *)
- (* Draws a `Map of your neighborhood.` This introduces people *)
- (* to `Map making on graph paper.' From there it`s an easy step *)
- (* to rectangular coordinates. In addition, it provides a base *)
- (* for `making your own maps` - exercises in applied math. *)
- (* *)
- (*******************************************************************)
-
- Procedure Maps;
- Begin Hires;
- Gotoxy(7,3);Write(' Rectangular '); Gotoxy(56,3);Write(' Pure ');
- Gotoxy(7,4);Write(' Coordinates '); Gotoxy(56,4);Write(' Mathematics ');
- Gotoxy(7,5);Write(' ~~~~~~~~~~~ '); Gotoxy(56,5);Write(' ~~~~~~~~~~~ ');
- Gotoxy(56,7);Write(' Space of 2 ');
- Gotoxy(56,8);Write(' Dimensions ');
- Gotoxy(56,9);Write(' ~~~~~~~~~~ ');
- Xlow:=26; Yhi:= 1; (* Axis specifications. *)
- Hlen:=24; Vlen:=12;
- Yzero:=Yhi+Vlen;
- {-----------------------------------------------------------------}
-
- Xhlow:=8*Xlow-2; Yhhi:=8*Yhi -4; (* Compute Hi-res *)
- Xhhi:=8*Hlen+Xhlow-2; Yhlow:=8*Vlen+Yhhi; (* scale end points. *)
-
- {---------------------------------------------------------------}
- Yinc:=Yhi+1;
- Vindx:=Round(Vlen/2);
- Gotoxy(Xlow,Yhi); Write(#218);
- For I:=1 to Vindx do begin (* Write Yaxis. *)
- Gotoxy(Xlow, Yinc);
- Write(#195);
- Gotoxy(Xlow,Yinc+1);
- Write(#197);
- Yinc:=Yinc+2;
- end;
-
- Ysc:=0; Ty:=Yzero; (* Write Y scale numbers.*)
- For I:=0 to 6 do begin
- Gotoxy(Xlow-2,Ty); Write(Ysc);
- Ysc:=Ysc+1;
- Ty:=Ty-2;
- end;
-
- Gotoxy(Xlow,Yzero); Write(#192); (* Write corner. *)
- {---------------------------------------------------------------}
-
- Xwide:=Round(Hlen/2);
- Xinc:=Xlow;
- For I:=1 to Xwide do begin (* Write X axis.*)
- Gotoxy(Xinc+1, Yzero);
- Write(#196,#194);
- Xinc:=Xinc+2;
- end;
-
- Gotoxy(Xlow,Yhi+Vlen+1); (* Write X Scale numbers.*)
- For I:= 0 to 6 do Write(I,' ');
-
- {---------------------------------------------------------------}
-
- Draw(Xhlow,Yhhi,Xhhi,Yhhi ,1); (* Put box around axes.*)
- Draw(Xhhi ,Yhhi,Xhhi,Yhlow,1);
-
- Draw(Xhlow,Yhhi+32,Xhhi,Yhhi+32,1); (* Draw `graph paper` lines.*)
- Draw(Xhlow,Yhhi+64,Xhhi,Yhhi+64,1);
- Draw(Xhlow+ 62,Yhlow,Xhlow+ 62,Yhhi,1);
- Draw(Xhlow+126,Yhlow,Xhlow+126,Yhhi,1);
-
- Gotoxy(21,1); Write('Y'); Gotoxy(53,14); Write('X');
- end; (* Procedure Maps *)
-
- {====================================================================}
- Procedure EquationControl; Forward;
- Procedure MapsControl;
-
- Begin Clrscr; (********** MAPS CONTROL ************)
- Gotoxy(1,2);
-
- Writeln(' Rectangular coordinate systems are used throughout mathematics. ');
- Writeln(' They look like grids on maps. Along the sides are ruler-like ');
- Writeln(' number scales for locating things, as on a map. However, there ');
- Writeln(' is an important difference. We consider it now. ');
- Key; Gotoxy(1,7);
-
- Gotoxy(15,7);Write(#218); For I:=1 to 48 do Write(#196);
- Gotoxy(64,7);Write(#191);
- Gotoxy(1,8);
-
- Writeln(' | Rectangular coordinates, and their number | ');
- Writeln(' | scales, do NOT relate to anything of the | ');
- Writeln(' | physical world. They relate only to the | ');
- Writeln(' | language of mathematics itself. | ');
- Writeln(' |________________________________________________| ');
- Key; Gotoxy(1,14);
-
- Writeln(' The instant we say that a given mathematical scale represents, ');
- Writeln(' for example, the scale on a map, we have moved from `pure` to ');
- Writeln(' `applied` mathematics. They are different!! ');
- Key;Gotoxy(1,18);
- Writeln(' Pure mathematics provides the language for endless applications. ');
- Writeln(' Like all languages, however, words are not the things they rep- ');
- Writeln(' resent! Confusion and blundering always result when people fail ');
- Writeln(' to distinguish between pure and applied mathematics. ');
- Key;Gotoxy(1,23);
- Writeln(' Now, on to rectangular coordinates. ');
- Key;
- Maps;
- Key;
- Gotoxy(1,17);
- Writeln(' Here is our coordinate system for a mathematical space of 2 ');
- Writeln(' dimensions. Horizontal lines (X axis) make one dimension, ');
- Writeln(' and vertical lines (Y axis) make the other. As on maps, we ');
- Writeln(' locate positions by the intersections of lines. ');
- Key;Gotoxy(1,22);
- Writeln(' Finally, here is a plot of a linear equation on the system. ');
- Writeln(' Note the RIGHT TRIANGLES formed by the line and the axes! ');
- Key;
- Draw(Xhlow,Yhlow,Xhhi,Yhhi,1);
- Key;Clrscr;
- Gotoxy(1,10);
- Writeln(' This completes our introduction to lines, and coordinate ');
- Writeln(' systems. Now for details about them. ');
- Writeln(' ------------------------------------- ');
-
-
- Node;
- EquationControl;
- Textmode(2);
-
- end; (* Procedure MapsControl. *)
- {====================================================================}
- (*******************************************************************)
- (* *)
- (* Explains fundamentals of linear equations, and relates them *)
- (* to things in their daily lives. *)
- (* *)
- (*******************************************************************)
- Procedure ItDraws; Forward;
- Procedure EquationControl;
-
- Begin (********** EQUATIONS CONTROL ************)
- Clrscr; Textmode(2);
-
- Maps; Gotoxy(21,1);Write('Y'); Gotoxy(53,14);Write('X');
- Key;
- Xlow:= 8; Yhi:=15; Hlen:=58; Vlen:=9; Boxes;
-
- Gotoxy(17,17);Write(' Here again is our simple linear equation.');
- Key; Draw(Xhlow,Yhlow,Xhhi,Yhhi,1);
- Key;
- Gotoxy(12,17);Write(' Two points establish a straight line. We write ');
- Gotoxy(12,18);Write(' a point as (X,Y). The origin of the system is ');
- Gotoxy(12,19);Write(' (0,0). Other points on the line are (2,2) (4,4). ');
- Key;
- Gotoxy(12,21);Write(' Its equation is: Y = X or ');
- Gotoxy(12,22);Write(' Y/X = 1 or X/Y = 1. ');
- Key; For I:=1 to 6 do begin
- Gotoxy(12,16+I);Write(' ');
- end;
-
- Gotoxy(12,17);Write(' Suppose we have 2 points, how do we derive the ');
- Gotoxy(12,18);Write(' equation that passes through them? We do this ');
- Gotoxy(12,19);Write(' in later programs. More about basics now. ');
- Key;
- Gotoxy(12,17);Write(' Another way to make lines is with one point and ');
- Gotoxy(12,18);Write(' a direction. Direction? What is a `direction` ');
- Gotoxy(12,19);Write(' in mathematics? Look at the above line to see. ');
- Key; For I:=1 to 6 do begin
- Gotoxy(12,16+I);Write(' ');
- end;
-
- Gotoxy(12,17);Write(' The coordinate system is the reference base for ');
- Gotoxy(12,18);Write(' directions. Start at (0,0), and move up the X ');
- Gotoxy(12,19);Write(' axis. The line goes up 1 Y unit per X unit. ');
- Key;
- Gotoxy(12,21);Write(' Hence `the SLOPE OF THE LINE` is: +1. ');
- Key;
- Gotoxy(12,22);Write(' And here is a line with a slope of -1. ');
- Key;
- Draw(Xhlow,Yhhi,Xhhi,Yhlow,1);
-
- Key; For I:=1 to 6 do begin
- Gotoxy(12,16+I);Write(' ');
- end;
-
- Gotoxy(12,17);Write(' Directions in mathematics are also stated by the ');
- Gotoxy(12,18);Write(' angle between the line and the X axis, or by its ');
- Gotoxy(12,19);Write(' tangent. But `slope` is enough for now. ');
- Key;
- Gotoxy(12,17);Write(' A line also crosses the Y axis at a point called ');
- Gotoxy(12,18);Write(' the `Y intercept.` Slope and intercept are the ');
- Gotoxy(12,19);Write(' 2 parts of the linear equation: Y = mX + b. ');
- Key;
- Gotoxy(12,21);Write(' The slope is m, and the Y intercept is b. ');
- Key;
- Gotoxy(12,22);Write(' For the 2 lines above, slopes are +1 -1. ');
- Gotoxy(12,23);Write(' Y intercepts are 0 6. ');
- Key; For I:=1 to 7 do begin
- Gotoxy(12,16+I);Write(' ');
- end;
-
- Gotoxy(12,19);Write('This completes our introduction to linear equations. ');
- Gotoxy(12,20);Write('Next section: You input the slope and Y intercept. ');
- Gotoxy(12,21);Write(' The computer draws the line for you. ');
- Node;
- ItDraws;
-
- end; (* EquationControl.*)
- {===================================================================}
-
- { 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!
- }
- Procedure Circles;
- Var Np,Xc,Yc,I,X,Y : Integer;
- Yr,Xr,Scale,Xrange,Yrange,A : Real;
-
- {===============================================================}
- Begin
- A:=0; Np:=100; Xc:=Xhlow; Yc:=Yhlow;
- Xrange:=Xhhi-Xhlow-2; Yrange:=Yhlow-Yhhi;
- Xrange:=Mradius*Xrange/6; Yrange:=Mradius*Yrange/6;
-
- Scale:=Pi/(2*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;
- Gotoxy(37,17); Write('X');
- Gotoxy(5,4 ); Write('Y');
- end; (* Procedure Circles. *)
- {===================================================================}
- Procedure Axes;
- Begin
- Xlow:=10; Yhi:= 4; (* Axis specifications. *)
- Hlen:=24; Vlen:=12;
- Yzero:=Yhi+Vlen;
- {-----------------------------------------------------------------}
-
- Xhlow:=8*Xlow-2; Yhhi:=8*Yhi -4; (* Compute Hi-res *)
- Xhhi:=8*Hlen+Xhlow-2; Yhlow:=8*Vlen+Yhhi; (* scale end points. *)
-
- {---------------------------------------------------------------}
- Yinc:=Yhi+1;
- Vindx:=Round(Vlen/2);
- Gotoxy(26,1); Write(' Computer Draws Your Lines. ');
- Gotoxy(26,2); Write(' ~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Gotoxy(Xlow,Yhi); Write(#218);
- For I:=1 to Vindx do begin (* Write Yaxis. *)
- Gotoxy(Xlow, Yinc);
- Write(#195);
- Gotoxy(Xlow,Yinc+1);
- Write(#197);
- Yinc:=Yinc+2;
- end;
-
- Ysc:=0; Ty:=Yzero; (* Write Y scale numbers.*)
- For I:=0 to 6 do begin
- Gotoxy(Xlow-2,Ty); Write(Ysc);
- Ysc:=Ysc+1;
- Ty:=Ty-2;
- end;
-
- Gotoxy(Xlow,Yzero); Write(#192); (* Write corner. *)
- {---------------------------------------------------------------}
-
- Xwide:=Round(Hlen/2);
- Xinc:=Xlow;
-
- For I:=1 to Xwide do begin (* Write X axis.*)
- Gotoxy(Xinc+1, Yzero);
- Write(#196,#194);
- Xinc:=Xinc+2;
- end;
-
- Gotoxy(Xlow,Yhi+Vlen+1); (* Write X Scale numbers.*)
- For I:= 0 to 6 do Write(I,' ');
-
- {---------------------------------------------------------------}
-
- Draw(Xhlow,Yhhi,Xhhi,Yhhi ,1); (* Put box around axes.*)
- Draw(Xhhi ,Yhhi,Xhhi,Yhlow,1);
-
- Draw(Xhlow,Yhhi+32,Xhhi,Yhhi+32,1); (* Draw `graph paper` lines.*)
- Draw(Xhlow,Yhhi+64,Xhhi,Yhhi+64,1);
- Draw(Xhlow+ 62,Yhlow,Xhlow+ 62,Yhhi,1);
- Draw(Xhlow+126,Yhlow,Xhlow+126,Yhhi,1);
-
- Gotoxy(5,4); Write('Y'); Gotoxy(37,17); Write('X');
-
- If Mradius<>0 then Circles;
-
- end; (* Procedure Axes. *)
- {====================================================================}
- Procedure ProjectsOne; Forward;
- Procedure ItDraws;
- Begin Clrscr; (********** CALLS CIRCLES & AXES ************)
-
- Gotoxy(1,6);
- Writeln(' Computer Draws Lines ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~ ');
- Gotoxy(1,9);
-
- Writeln(' The computer now draws lines for you (at most 5). A ');
- Writeln(' coordinate system is displayed. For each line, you ');
- Writeln(' input the slope and the Y intercept. The computer ');
- Writeln(' draws the line and displays the equation. ');
- Writeln;
- Writeln(' There are relationships between straight and curved ');
- Writeln(' lines. So that you may start to see them, an arc of ');
- Writeln(' a circle can be input first. For its radius, enter ');
- Writeln(' a number in the range 0-6 (except 0). ');
- Writeln(' ------------------------------------ ');
- Gotoxy(17,20);
- Write(' ---> Want Circle Arc on Graph? <---');
- Gotoxy(20,22);Write(' Enter 0 for `No` or Radius ');
- Read(Mradius);
- {---------------------------------------------------------------------}
- Hires; Axes; Neq:=1;
- GraphWindow(0,24,300,130);
- Repeat
-
- Gotoxy(40, 5+Neq);
- Write(' Input Y intercept (+/- 6) ');
- Readln(Ycept); Y1off:=Round(16*Ycept+24);
- Gotoxy(40, 6+Neq); Neq:=Neq+2;
- Write(' Input Slope (+/- 10) ');
- Read(Slope); Y2off:=Round(96*Slope);
-
- Gotoxy(40,Neq+3); Write(' y = ',Slope:2:1,'x + ',Ycept:2:1,' ');
- Gotoxy(40,Neq+4); Write(' ');
- Draw(Xhlow,Yhlow-Y1off,Xhlow+190,Yhlow-Y1off-Y2off,1);
-
- Gotoxy(42,17); Write('Another equation (Y/N) ? ');
- Repeat
- Read(Kbd,Ch);
- Ch:=Upcase(ch);
- until (Ch In ['Y','N']);
- Gotoxy(42,17); Write(' ');
-
- until (Neq>9) or (Ch='N');
-
- Node;
- ProjectsOne;
- Textmode(2);
-
- end; (* Procedure ItDraws. *)
- {===================================================================}
- Procedure ProjectsTwo; Forward;
- Procedure ProjectsOne;
- Begin Clrscr;
- Gotoxy(1,1);
- Writeln(' Enjoyable Learning Projects ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' Mathematics is a language. Science is the study of ');
- Writeln(' nature. Its basic features do not change. Matter ');
- Writeln(' is matter, and energy is energy. Math is our lang- ');
- Writeln(' uage for describing the orderly patterns of nature. ');
- Writeln(' Math foundations remain the same too. ');
- Writeln;
- Writeln(' So how do we approach learning together the fundam- ');
- Writeln(' entals of science and math? Computers and books ');
- Writeln(' are useful, but experimenting, measuring, and study- ');
- Writeln(' ing results of experiments are essential too. Hence ');
- Writeln(' our approach must include experiments. That`s what ');
- Writeln(' enjoyable learning projects are about. ');
- Writeln;
- Writeln(' A list of recommended books is given in the next pro- ');
- Writeln(' gram (Math22). Physics books are the best sources ');
- Writeln(' of existing information about projects, although for ');
- Writeln(' present purposes, they are none too good. ');
- Writeln;
- Writeln(' Our approach is new, so we can`t say much about spec- ');
- Writeln(' ific projects. We sketch just 2 kinds. Work out de- ');
- Writeln(' tails yourself. You will learn better that way! ');
- Writeln(' ----------------------------------------------- ');
- Key; ClrScr;
- Gotoxy(1,5);
- Writeln(' Projects #1 - Rates. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' Simple projects involve us in experimenting and ');
- Writeln(' measuring. Experiments show us `how things work.` ');
- Writeln(' With mathematics we use our measurements to des- ');
- Writeln(' cribe the patterns and flows of nature seen in the ');
- Writeln(' experiments. Understanding all these things takes ');
- Writeln(' time, so don`t expect too much too soon. ');
- Writeln;
- Writeln(' Written instructions are best for experiments, so we only ');
- Writeln(' outline them here. Rates are featured in the first set. ');
- Writeln(' -------------------------------------------------- ');
-
- Key;Clrscr;Gotoxy(1,3);
- Writeln(' 1. Flow rates of liquids. Start a thin stream of water ');
- Writeln(' flowing in the kitchen sink. Record the number of seconds ');
- Writeln(' required to fill a measuring cup. Compute the flow rate. ');
- Writeln(' Compute the time required to fill a 1 gallon bucket at the ');
- Writeln(' same rate. A linear equation will do this. Check the val- ');
- Writeln(' idity of your estimate by filling the bucket! ');
- Writeln;
- Writeln(' 2. Constant speed. On a sidewalk or hallway, mark a start ');
- Writeln(' and finish line 20 to 30 feet apart. Measure the distance ');
- Writeln(' between them. Walk at your usual pace, and record the num- ');
- Writeln(' ber of seconds to cover the distance. Compute your walking ');
- Writeln(' rate. If you walked at the same rate, and could do so, how ');
- Writeln(' long would it take to walk to the moon? Assume that the ');
- Writeln(' moon is 240 thousand miles away (linear equation again). ');
- Writeln;
- Writeln(' 3. Height changes. Put on a table a box several inches ');
- Writeln(' high. Place a stick so that one end rests on the table, ');
- Writeln(' and the other on the box. At what rate does the stick ');
- Writeln(' rise per inch along the table? What represents the line, ');
- Writeln(' and what is the equation for the line? ');
- Writeln(' -------------------------------------- ');
- Key; Clrscr; Gotoxy(1,8);
- Writeln(' Relating the Projects to the Mathematics. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' Doing experiments is always enjoyable. People can really ');
- Writeln(' get involved in them. What then, does the mathematics do ');
- Writeln(' that nothing else can? That`s what is meant by `Relating ');
- Writeln(' the Projects to the Mathematics.` ');
- Writeln;
- Key; Gotoxy(1,15);
- Writeln(' Before considering this statement, we look at another even ');
- Writeln(' more basic thing - Measurement. What are the fundamental ');
- Writeln(' measurements of science? ');
- Writeln(' ------------------------ ');
- Key;
-
- Clrscr; Gotoxy(1,8);
- Writeln(' The Three Basic Measurements of Science. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Gotoxy(1,12);
-
- Writeln(' Yes, there are only 3 basic measurements needed ');
- Writeln(' and used in science. they are: ');
- Key; Xlow:=10; Yhi:=10; Hlen:= 53; Vlen:=6; Boxes;
- Gotoxy(17,15);
- Writeln(' LENGTH TIME MASS (Weight). ');
- Key;Gotoxy(1,20);
- Writeln(' Only time and length were used in our experiments. ');
- Writeln(' Now, on to how we used them. ');
- Writeln(' ---------------------------- ');
- Key; Hires; Gotoxy(1,1);
- Writeln(' Relating the Projects to the Mathematics. ');
-
- TriDraw(42,3,20,7); (* Call Triangle Draw. *)
-
- Gotoxy(42,5); Write('Projects'); Gotoxy(60,6); Write('Water');
- Gotoxy(49,10); Write('Time,Length');Gotoxy(61,7); Write('You');
- Gotoxy(60,8); Write('Length');
- Key;Gotoxy(1,12);
-
- Writeln(' For each project we computed a rate. A triangle nicely pictures ');
- Writeln(' any rate, because a rate is: The amount of change in one thing ');
- Writeln(' (side scale) per unit change in the other (bottom scale). For ');
- Writeln(' instance, your walking rate is about 3 to 4 feet per second. In ');
- Writeln(' our equation Y = mX + b, m is the rate. ');
- Key;Gotoxy(1,18);
- Writeln(' In the water experiment, water quantity is its volume. The unit ');
- Writeln(' of volume is the liter, which is derived from length. In the ');
- Writeln(' `stick slope` experiment, length is used for both scales. ');
- Key; Gotoxy(1,22);
- Writeln(' Now, what role does `pure mathematics` play in this? ');
- Writeln(' ---------------------------------------------------- ');
- Key; Gotoxy(1,12); For I:=1 to 12 do
- Writeln(' ');
-
- TriDraw(10,3,20,7);
-
- Gotoxy(28,7); Write('Change'); Gotoxy(16,9); Write(#224);
- Gotoxy(28,8); Write(' in Y '); Gotoxy(10,5); Write('Mathematics');
- Gotoxy(19,10); Write('1 X unit');
- Key;Gotoxy(1,13);
- Writeln(' Did you think our `pure math rate-picture` would be a ');
- Writeln(' triangle too? If so, then perhaps you are beginning ');
- Writeln(' to get a feeling for their relationships. ');
- Key;Gotoxy(1,13);
- Writeln(' The pure math triangle has a bottom length of 1. This is ');
- Writeln(' not approximately 1, but EXACTLY 1. The side length can ');
- Writeln(' be any number (including zero). The numbers are related ');
- Writeln(' by the fact that they form a triangle. ');
- Key;Gotoxy(1,18);
- Writeln(' We have related experiments to applied math, applied math ');
- Writeln(' to pure math. Now look at relationships within pure math. ');
- Writeln(' (See Math22 for more about triangles.) ');
- Writeln(' -------------------------------------- ');
- Key;Hires;Gotoxy(1,1);
- Writeln(' Relating Topics Within Pure Math. ');
-
- TriDraw(45,4,9,4); Gotoxy(50,6);Write('1');
- Gotoxy(41,4);Write(' Circle'); Gotoxy(49,7);Write(#224);
- Gotoxy(41,5);Write('Triangle');
- Key;Gotoxy(1,11);
- Gotoxy(1,11);
- Writeln(' In the triangles program, we formed them by rotating a rad- ');
- Writeln(' ius of length 1, as the diagram shows. All possible right ');
- Writeln(' triangles with a long side of 1 are thus made. ');
- Key;Gotoxy(1,15);
- Writeln(' Above is one of them. The shorter sides are the same length, ');
- Writeln(' so alpha is 45 degrees. ');
- Key;Gotoxy(1,18);
- Writeln(' We are discussing linear equations. The coefficient of X ');
- Writeln(' is a rate. Rates make triangles with a bottom length of 1. ');
- Writeln(' What do we see when we look together at `rate` and `circle` ');
- Writeln(' right triangles (shorter side lengths the same)? ');
-
- Key;Gotoxy(1,11);
- Writeln(' Here is a `rate triangle` with shorter sides of length 1. ');
- Writeln(' Study the similarities and differences between the two. ');
- Gotoxy(1,13); For I:=1 to 9 do
- Writeln(' ');
-
- TriDraw(18,3,12,5);
- Gotoxy(14,4);Write(' Rate'); Gotoxy(30,6);Write('1');
- Gotoxy(14,5);Write('Triangle'); Gotoxy(25,8);Write('1');
- Gotoxy(22,7);Write(#224);
-
- Key;Gotoxy(1,14);
- Write(' Pythagoras`s theorem, a',#253,' + b',#253,' = c',#253',');
- Gotoxy(45,14);Writeln('allows us to compute ');
- Writeln(' the side lengths. Hence for the `rate triangle,` we have: ');
- Key;Gotoxy(24,5);Write(#251,'2');
- Key;Gotoxy(1,17);
- Writeln(' The long side length is the square root of 2. But ');
- Writeln(' what are the side lengths of the `circle triangle?` ');
- Key;Gotoxy(1,20);
- Writeln(' Compute them and ponder the results! ');
- Writeln(' ----------------------------------- ');
- Key;Gotoxy(1,22);
- Writeln(' This completes our discussion of Projects #1. ');
- Node;
- ProjectsTwo;
- end; (* Procedure ProjectsOne. *)
- {===================================================================}
- Procedure ProjectsTwo;
- Begin Textmode(2); Clrscr;
-
- Gotoxy(1,1);
- Writeln(' Projects #2. Long-Term Projects. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' Long term projects for integrated, systematic study of science ');
- Writeln(' and math are new approaches to learning. Therefore, there are ');
- Writeln(' no books for it. A list of recommended books is given at the ');
- Writeln(' end of Math22. Another title is given later. Now, what is ');
- Writeln(' the meaning of `Long-Term Projects?` ');
- Writeln;
- Writeln(' College science courses are somewhat like long term projects. ');
- Writeln(' But we want to do them at home, at any time of life, and we ');
- Writeln(' may want to work on them for years - beginning as youngsters. ');
- Writeln(' In other words, think of them as hobbies, except we are learn- ');
- Writeln(' ing real science and mathematics. ');
- Writeln;
- Writeln(' Electronics provides many opportunities for long term projects. ');
- Writeln(' The programs Ohm1 and Ohm2 on this disk describe opportunities ');
- Writeln(' in that direction. Others are being prepared. ');
- Writeln;
- Writeln(' Electronics, however, is too abstract for young children. We ');
- Writeln(' need something more basic - something to which they can relate ');
- Writeln(' while learning to count. Adults could benefit from new basic ');
- Writeln(' materials too. Can such materials be devised? Of course. ');
- Writeln(' `Map Making` provides the core of the approach. ');
- Writeln(' ----------------------------------------------- ');
- Key;Clrscr;
-
- Writeln(' Projects #2. Math-Mapping. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' Note the title, Math-Mapping. It`s useful because math and ');
- Writeln(' mapping are closely related, as we have seen. Map making ');
- Writeln(' can be started with counting and arithmetic. Its use can ');
- Writeln(' continue into college level material. As projects and math ');
- Writeln(' are developed, they are related to other science foundation ');
- Writeln(' subjects. That`s why this approach is suggested. ');
- Writeln;
- Writeln(' Of course there are no books for it. Even for map making, ');
- Writeln(' few titles are in print. In the references is: Brown, L. A. ');
- Writeln(' The Story of Maps. Brown wrote a book on map making too. ');
- Writeln(' It should be helpful, if you can find it. The Boy Scout Man- ');
- Writeln(' ual, Orienteering (#3385) might be useful too. ');
- Writeln;
- Writeln(' Because of the above, all we can do is outline approaches to ');
- Writeln(' unified development. Once you `get the hang of it,` however, ');
- Writeln(' you`ll find that developing them yourself is enjoyable too! ');
- Writeln;
- Writeln(' Here is how to start: ');
- Writeln(' --------------------- ');
- Key;Clrscr;
- Gotoxy(1,1); For I:=1 to 6 do begin
- Writeln(' ****** USE PHYSICAL DEVICES TO RELATE TO THE MATH ****** ');
- Writeln;
- end;
- Gotoxy(1,15);
- Writeln(' Sorry, but that really needs emphasizing. Excepting wood ');
- Writeln(' blocks, we have NO physical-device aids for learning math.');
- Key;Gotoxy(1,18);
- Writeln(' We now start to devise them. ');
- Writeln(' ---------------------------- ');
- Key;Clrscr; Gotoxy(1,4);
- Writeln(' Wood Blocks. Get a set of wood blocks. Use them to review ');
- Writeln(' arithmetic. Pay special attention to: The different meanings ');
- Writeln(' of zero. Fractions - Top and bottom numbers mean different ');
- Writeln(' things!! The botton number is: The `fraction of 1.` The ');
- Writeln(' top number is: How many `fractions of 1` we have. ');
- Writeln;
- Writeln(' Game boards. Take any game board, such as checkers or battle- ');
- Writeln(' ship. See how you might use it with wood blocks for math lea- ');
- Writeln(' rning, and in addition to wood blocks. Regard the boards as ');
- Writeln(' math rectangular coordinates, and as map grids. See how much ');
- Writeln(' math and mapping you can learn with its aid. ');
- Writeln;
- Writeln(' Math-Map Board. After experimenting with game boards, make a ');
- Writeln(' board specially designed for math learning and mapping. Remem- ');
- Writeln(' ber you may use it for years at all levels of learning, and ');
- Writeln(' it`s YOUR PERSONAL BOARD. Keep making them until you get one ');
- Writeln(' or more that you really like. ');
- Writeln;
- Writeln(' Now for Math-Map Projects. ');
- Writeln(' -------------------------- ');
- Key;Clrscr;
- Gotoxy(1,5);
- Writeln(' Math-Map Projects. ');
- Writeln(' ~~~~~~~~~~~~~~~~~~ ');
- Writeln(' We are discussing long-term activities. Specific experiments, ');
- Writeln(' like those described earlier, are part of long term studies. ');
- Writeln(' It`s `areas of knowledge` we want to learn. ');
- Writeln(' ------------------------------------------- ');
- Writeln;
- Writeln(' Mapping. Learn `Table-Top Mapping.` In other words, start ');
- Writeln(' with simple projects, and work where it`s most convenient. ');
- Writeln(' Put objects on a table, and `draw a map` of their location. ');
- Writeln(' Repeat your experiments, bringing in as much math as you can ');
- Writeln(' can handle at the time. As you learn, new possibilities will ');
- Writeln(' suggest themselves. ');
- Writeln;
- Writeln(' At times, work with others. Share what you have learned, and ');
- Writeln(' discuss things not yet understood. Try to see how your appr- ');
- Writeln(' oach to `maps` and math applies to other situations too. ');
-
- Key; Clrscr; Gotoxy(1,5);
- Writeln(' Get a notebook. Keep notes of what you do. Learning WHAT ');
- Writeln(' to write down, and how to review your notes, is a vital part ');
- Writeln(' of learning. Sorry, I know of NO references to guide you ');
- Writeln(' here. But this may help: When you feel that you really ');
- Writeln(' understand something, write a summary of the topic. Set it ');
- Writeln(' aside for some weeks, and go over it again. You will see ');
- Writeln(' your material `in a different light,` and will learn in the ');
- Writeln(' process. Do this again over a period of months - years too. ');
-
- Writeln;
- Writeln(' Mathematics. We are studying science and math together, ');
- Writeln(' so there is not much else to say. When looking at math ');
- Writeln(' books, however, see if you can work problems with the ');
- Writeln(' aid of your math-map board. Remember that there are ');
- Writeln(' relationships `within math,` as well as `between math ');
- Writeln(' and experiments.` Use your board to study within-math ');
- Writeln(' relationships too. ');
- Writeln(' ------------------ ');
- Key;Clrscr;
- Gotoxy(20,9); Write(' End Of Program Math21 of the Series:');
- Gotoxy(20,10); Write('Foundations of Science and Mathematics.');
- Xlow:=17; Yhi:=7; Hlen:=42; Vlen:=4; Boxes;
-
- Gotoxy(16,15); Write(' The Program Math22 covers the the Theorem of ');
- Gotoxy(16,16); Write(' Pythagoras, Triangles, and their uses. ');
- Gotoxy(16,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 ProjectsTwo. *)
- {===================================================================}
- Procedure MainControl;
-
- Begin (* *** MAINCONTROL *** *)
- Assign(Ccontrol,'Control.com');
- Clrscr;
- Gotoxy(1,3);
-
- Writeln(' RELATING TO LINEAR EQUATIONS ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Gotoxy(1,7);
- Writeln(' First program about linear equations. Highlights ');
- Writeln(' are: Relating equations to lines, rulers, maps and ');
- Writeln(' map making, and distinguishing between pure and ');
- Writeln(' applied mathematics. ');
-
- Gotoxy(1,14);
- Writeln(' Press key for topic wanted: ');
- Writeln(' ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ');
- Writeln(' 1 Equations & lines. 4 Computer drawn lines. ');
- Writeln(' 2 Rectangular coordinates. 5 Projects & math. ');
- Writeln(' 3 Lines & coordinates. 6 Long-term projects. ');
- Writeln(' C Control program. ');
- Writeln(' _______________________ ');
- Gotoxy(71,25);Write('Oct 1985');
- Gotoxy( 1,25);Write('Math21');
- Xlow:= 9; Yhi:=5;
- Vlen:= 6; Hlen:=56; Boxes;
- {-------------------------------------------------------}
-
- Gotoxy(1,16);Write('I want no.');
-
- Repeat
- Read(Kbd,Zh);
- Zh:=UpCase(zh);
- until (zh in ['1','2','3','4','5','6','C']);
-
- Case Zh of (* Calls procedure wanted. *)
- '1': RulerControl;
- '2': MapsControl;
- '3': EquationControl;
- '4': ItDraws;
- '5': ProjectsOne;
- '6': ProjectsTwo;
- 'C': Execute(Ccontrol);
- end; (* Case *)
-
- end; (* Procedure MainControl. *)
- {===================================================================}
- Begin (************ MAIN PROGRAM ***************)
-
- MainControl;
- Textmode(2);
-
- end.
- {===================================================================}
-