home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1986-11-21 | 3.6 KB | 106 lines |
- (*
- This module contains procedures that display some of the
- 'about' pages.
-
- Note: If this module doesn't compile, and you get an error
- "too many strings", then you will have to re-configure
- your compiler to have larger space allocated for strings.
-
- Created: 8/30/87 by Richie Bielak
-
- Modified:
-
- Copyright © 1987 by Richie Bielak
-
- This program maybe freely copied, but please leave my name in.
- Thanks...Richie
-
- *)
- IMPLEMENTATION MODULE ChaosPages;
-
- FROM SYSTEM IMPORT ADR;
- FROM Text IMPORT Text;
- FROM Intuition IMPORT WindowPtr;
- FROM Drawing IMPORT SetAPen, Move;
-
- VAR
- cur_x, cur_y : CARDINAL;
-
- (* ++++++++++++++++++++++++++++++++++++++++ *)
- (*$D- *)
- PROCEDURE WriteT (wp : WindowPtr; text : ARRAY OF CHAR);
- BEGIN
- Move (wp^.RPort^, cur_x, cur_y);
- INC (cur_y,10);
- Text (wp^.RPort^, ADR(text), HIGH(text));
- END WriteT;
- (*$D+ *)
-
- (* ++++++++++++++++++++++++++++++++++++++++ *)
- PROCEDURE DisplayPage1 (wp : WindowPtr);
- BEGIN
- cur_x := 5; cur_y := 20;
- SetAPen (wp^.RPort^, 15);
- WriteT (wp, " This program can be used to explore");
- WriteT (wp, 'the "Hennon mapping". The mapping');
- WriteT (wp, "consists of iterative application of");
- WriteT (wp, "a function to points on a plane. The");
- WriteT (wp, "function is applied to a starting ");
- WriteT (wp, "point to give another point. Then the");
- WriteT (wp, "function is applied to the second");
- WriteT (wp, "point, to give a third ... and so on.");
- WriteT (wp, "All computed points are plotted. The ");
- WriteT (wp, "resulting drawing is an 'orbit'. When");
- WriteT (wp, "a different starting value is picked");
- WriteT (wp, "a new orbit results. This program will");
- WriteT (wp, "draw a number of orbits to produce its");
- WriteT (wp, "picture. Using the control panel you ");
- WriteT (wp, "change the starting condition to get");
- WriteT (wp, "different pictures.");
- END DisplayPage1;
-
- (* ++++++++++++++++++++++++++++++++++++++++ *)
- PROCEDURE DisplayPage2 (wp : WindowPtr);
- BEGIN
- cur_x := 5; cur_y := 20;
- SetAPen (wp^.RPort^, 15);
- WriteT (wp, " The following formula is used to");
- WriteT (wp, "compute the pictures:");
- WriteT (wp, " ");
- WriteT (wp, " x = x * cos(a) - (y - x*x) * sin(a)");
- WriteT (wp, " y = x * sin(a) + (y - x*x) * cos(a)");
- INC (cur_y,10); (* Skip a line *)
- WriteT (wp, "The coefficient 'a' determines the");
- WriteT (wp, "shape of the final picture. The values");
- WriteT (wp, "of 'a' should stay in the range 0 to");
- WriteT (wp, "about 7.");
- INC (cur_y,10);
- WriteT (wp, "To find out more about Hennon maps see");
- WriteT (wp, "the 'Computer Recreations' column in");
- WriteT (wp, 'July 1987 "Scientific American".');
- END DisplayPage2;
-
-
- (* ++++++++++++++++++++++++++++++++++++++++ *)
- PROCEDURE DisplayPage3 (wp : WindowPtr);
- BEGIN
- cur_x := 5; cur_y := 20;
- SetAPen (wp^.RPort^, 15);
- INC (cur_y,10);
- WriteT (wp, " This program was written using the");
- WriteT (wp, " Benchmark Modula-2");
- WriteT (wp, " by Richie Bielak");
- INC (cur_y, 10);
- WriteT (wp, " Copyright © 1987 by Richie Bielak");
- INC (cur_y, 10);
- WriteT (wp, " This program can be freely copied,");
- WriteT (wp, " but please leave my name in. Thanks!");
- INC (cur_y, 10);
- WriteT (wp, " Thanks to Mike Scalora for EASYMENUS!");
- INC (cur_y, 10);
- WriteT (wp, " Comments/question -> Richie Bielak");
- WriteT (wp, " CIS 75716,352, PLINK: RICHIEB");
- END DisplayPage3;
-
- END ChaosPages.
-