Kits
QRP Labs |
Other Radio Topics
Frequency Counters
Electronics
Guest Project Gallery
The University of Mandelbrot |
![]() |
![]() |
![]() |
Written by Hans Summers | |||||
Friday, 31 December 2010 10:47 | |||||
Well I was not long turned 19 years old when I arrived at Imperial College, University of London to study a physics degree. In the first year, three afternoons per week were to be spent in the laboratory on practical experiments. One of the lab subjects was computing, and by good fortune I was in the lab group which did computing first. The 1'st year physics laboratory computer was a VAX. Connected to this were about 40 or 50 terminals. A handful were real WYSE terminals, the rest were ex-BBC computers (popular 1980's UK home/educational computer); they had had their ROM replaced such that they behaved like terminals. The computer course aimed to teach us Fortran 77 and we were advised to forget any previous bad habits, such as the BASIC we might have learnt from our 1980's home computers (ZX Spectrum, BBC, Commodore 64 etc). This was supposed to make it easier to learn a "real" programming language like Fortran. I suspected this advice would be unuseful, and was not proved wrong. Why Fortran? Apparently most scientific programming took place in Fortran because of the large scientific libraries available in Fortran. I did not particularly like Fortran though the VAX was the fastest computer I had ever used. I have in any case always felt that a good programmer could make sense of ANY programming language. In the course of my professional life I have used several, finding it easier each time to learn a new one. Some things might be easier or more difficult in different languages but ultimately any program comes down to logic, and if you are good with logic you'll be able to write good programs in almost any language once you've learnt the particular syntax and rules. Of some concern was the disk space allocation to each student, of just 500 blocks. One VAX "block" is actually 512 bytes, so 500 blocks corresponds to about 250K of disk space. This was plenty for the simple Fortran programs but not so much space for storing the output files of Mandelbrot sets. But then again we weren't supposed to be creating Mandelbrot sets. The VAX operating system, VMS, I found very nice. I later worked on a legacy VAX application in my first job, where I learnt a lot more VMS. It is easy to use, type "Help" and you can be sure of finding a clear explanation of anything you want to know about the VMS commands. VMS is not case sensitive like UNIX, and you can abbreviate commands as short as you like so long as there is no ambiguity. For example, for a directory listing you can type "directory", "direc", or "dir". But not "di" as other commands also start "di" and VMS obviously can't resolve the ambiguity. By reading the Help files I learnt a lot of interesting VAX commands. Things like "broadcast", which allowed you to cause a message to appear on another terminal once you knew their port number. Or "phone" where you could chat to one or more other students using the keyboard. Not that there was much utility in messaging someone who sat only a few feet from you but it was fun. Naturally a lot of friends learnt the use of these commands from my example, curious about how the messages on their screens were caused. Messages appearing on the recipient's screen in the middle of their program editing caused some disruption since the Later, Mrs M made some modifications to the permissioning to restrict that useage of some of the more damaging commands. For example, they stopped /all on the "broadcast" command, which sent a message to EVERY terminal screen. I don't think they'd ever had students on that system who had known about all those commands. I have always said, ignorance is the best security. Unfortunately, we weren't ignorant so they had to resort to more blunt security devices. The computing course consisted of a number of exercises, each teaching us various aspects of Fortran programming in a Physics setting. After some preliminary tutorials we started solving differential equations (see graph above right. Click here for a larger version, 600 x 454, 9K), some matrix manipulation (for solving simulataneous equations), and finally modelling of a chaotic double-pendulum system. Two forms of output were available: a line printer (dot matrix) which could print program listings. This could only print text output, like program listings or results. The other output device was an X-Y pen plotter. Our programs were linked to a graphics library for graphing results, this produced a nice graph image on the screen which could be sent to the X-Y plotter where it was drawn onto an A4-sized piece of paper. The paper is placed in the plotter and drawing takes place by a small pen which is moved all over the paper by motors in the vertical and horizontal directions (relative to the paper). The pen is raised or lowered to create lines as it is moved. It can draw lines and curves without lifting the pen, but numbers and the graph tick marks are drawn in small strokes, lifting the pen between strokes. This creates quite a noise as the pen is repeatedly raised and lowered. Quite an amusing machine. Very soon, an alternative use for the X-Y plotter suggested itself to my mind. Mandelbrot sets! The difficulty was that the graphics library did not allow me to draw points, it was just a scientific graphing program. That however was merely a temporary obstacle. Soon I discovered that the drawing of the axes, title and value labels could be supressed. I could draw very many When I had this nice Mandelbrot set drawn on the green terminal screen, the next thing to do was print it on the X-Y plotter. I suspected that the huge detail of the Mandelbrot set would take somewhat longer to draw than the usual graphs associated with the computer course. Therefore I would probably not make any friends amongst fellow students by plotting the set during the official course hours. So I returned the following morning when the lab was quiet, logged in (SUMMERS_HJA) and issued the command to send my Mandelbrot file to the X-Y plotter. A tremendous racket ensued, twice as loud as the ordinary plotter noise from the course graphs, as my Mandelbrot set contained so many short lines which had to be drawn by lifting and setting down the pen in quick succession. After watching for a few moments to satisfy myself that all was going according to plan, I calculated a prediction of how long plotting would take, based on the time taken to plot the first few lines and knowledge of the total number of lines. I left the lab and went about my ordinary business. Perhaps a lecture to attend or some such. I returned approximately one and three quarter hours later when the estimated time had elapsed, and sure enough the plot was close to completion. However my return was not uneventful. Standing (perhaps "hopping" would be a better description) next to the plotter in full tornado mode was a furious Mrs M. This SUMMERS_HJA chracter was becoming troblesome. Evidently earlier that morning she had replaced the worn out pen of the plotter with a brand new one. Well, I had indeed noticed that the lines of my Mandelbrot plot were looking very neat and more clear than usual, so it did make some sense. She was highly perterbed by my Mandelbrot set which was busily destroying her brand new pen by it's repeated raising and slamming down of the pen on the paper at so much higher a rate than was ordinarily supposed to happen. To this day I still wonder quite why Mrs M allowed my Mandelbrot set plot to complete. With complete control over everything that happened in the VAX she would have been able to terminate it before it was able to do too much damage to her pristine new pen. Perhaps she wanted to catch me in the act. Maybe she wondered what a Mandelbrot set was (she's a Physicist, after all). Or is there a small chance that somewhere deep inside she could see the funny side? It was many months before normal diplomatic relations were resumed. I was requested in no uncertain terms to desist from such activities in future. An order which was not obeyed: I produced several more Mandelbrot sets. Below is a series of three, from the entire set on the left to two successive magnifications, of the same areas as illustrated in the centre pages of James Gleick's book "Chaos". You can see that the quality of the line drawing is never as clear or as black as it was on my first set, with the brand new pen. Click on the pictures or links under them for larger views. My VAX Mandelbrot hack is one of my favourite Mandelbrot set adventures, I still treasure the X-Y plotter outputs. |
|||||
Last Updated on Friday, 31 December 2010 11:23 |