PPPPPP RRRRR OOOOOO GGGGGGG RRRRR AAA MM M MM MM M MM IIIIII N N GGGGGGG
PP PP RR RR OO OO GG GG RR RR AA AA MM M M MM MM M M MM I NN N GG GG
PP PP RR RR OO OO GG RR RR AA AA MMM MMM MMM MMM I NNN NN GG
PPPPPP RRRRRRR OO OO GG GGG RRRRRRR AAAAAAA MM MM MM MM I NN NNN GG GGG
PP RR RR OO OO GG GG RR RR AA AA MM MM MM MM I NN NN GG GG
PP RR RR OOOOOO GGGGGGG RR RR AA AA MM MM MM MM IIIIII N N GGGGGGG
Home
Moray & POV-Ray
Plants & Garden
Crafting
Diary
Programming
Just in case you managed to come straight to this page I will repeat a little about myself. For those of you who have read this skip down to the next paragraph. A Commodore 64 brought me into the home computer market. Games like Thrust, Druid, Druid II, Gauntlet, etc, allowed me to experience another kind of world. One where the imagination is key. I never really got to grips with programming it. I did type in lots of Commodore 64 magazine listings. And I bought a fancy disc drive! It is sitting beside me as I type. The actual computer itself is hiding in a friends house. His mum tidied it away and no one can find it. When I get it back this will seem very funny, I am sure. So anyhow, I went to Uni failed then went to Paisley College and studied Computing Science. Having passed that I then started work doing this Baan (Triton in those days) stuff.
So since then, 1995, I have programmed for lots of people. Some large companies and lots of small ones. At the moment I am working for no one. [If you know of some one in the Milton Keynes area looking for a good programmer then let me know!] So I am creating and maintaining this web site and doing programming stuff for myself.
I have found Neon Helium which is a site dedicated to OpenGL, Silicon Graphics's graphics application programming interface (API). Now on his web pages are lots of tutorials explaining "How To" for OpenGL. It really is a very good site for someone trying to learn more about OpenGL. I also have a book called, Inetractive Computer Graphics - An interactive approach with OpenGL, by Edward Angel, ISBN. 0-201-85571-2, published by Addison-Wesley.
Now don't get me wrong, there is nothing inherantly bad or poor about the book. It just assumes that you have a utility library available called GLUT. This is a very useful and extremely powerful library that does most of the messy operating system type calls. The programmer can then concentrate on the bit they want to deal with what the program is suppose to do. Alas, or whatever, under Windows I have had a few problems with this. Namely that the GLUT library will not work. So I have done most of the programming under Linux. Where the GLUT library exists and works perfectly. So far so good. The NeHe stuff works under and is coded for windows though, so no problems there.
Now one of the tutorials was a fascinating one building a very simple maze-like textured structure. There was no idea of collision detection and no way to differentiate the wall polygons from the floor or ceiling ones. With a bit of effort I have written a slightly more complex version which creates a "proper" maze. As show here. As you can see it is possible to specify the walls, floor and ceiling textures. The ones I have created are somewhat basic but they are simply to give an idea of what can be achieved.
The inspiration for the above program demo is going to be extended to make it better. I would post a copy of the source but it takes up a lot of space because there is a library that needs to be included. When I am finished I will give everyone a chance to laugh at my coding.
The to-do list for the demo is quite large. My final aim is to integrate the Net Hack source code that creates an interactive random type maze. With monsters and all of the other things that makes Net Hack such a fabulous game. As you can imagine this is a major undertaking. I managed to compile the source under Linix OK. But trying the same under C++ has proved to be a bit of a problem. I have got the source to compile to an object but linking will not work. Loads of unresolved functions and even objects and structures. Frankly a complete pain. So I am slowly getting there.
Now I guess that some people who might read this page might not actually know what I am talking about here. So a little information will be required to bring them up to speed about ascii art. ASCII is the American Standards Committe International (Or something like that) standard for defining characters. So we have something like the following, 32=" ", 33="!", 34=""", 35="#", etc. Now in the olden days people had access to very limited technology. None of these fancy graphics system that everyone takes for granted. The best that most very rich organisations had was a Techtronik vector graphics system. And frankly not a lot of places could afford one!
So instead of printers capable of printing out picture quality graphics another way had to be found. Inspired somehow the idea of using ascii characters to draw things became the norm. (Of course I am 100% sure someone else will think this totally wrong. I am simply sumarising a few years of computer history for the youngsters of today, so quit whinning.) Another key idea for the kind of ascii art I like is that a character printer can be used to overprint a line. I.e. sending a carriage return without a line feed means the print head will overstrike the line. Making the "pixels" appear darker. Obviously the resolution of a printer is far less than that of a modern computer screen. Way less. But this disadvantage is to my mind a great advantage. I am not aware of easily and far more importantly cheaply creating poster sized images. The ink jet I have will produce photo quality images. Great, but it is limited to A3. A character printed document can span many pages.
In fact one of the images I have is of the Golden Gate Bridge and spans eight sheets. The picture of Mr Spock that is above my desk spans just over three sheets. If anyone is interested Mr Spock was done by Samuel P. Harbison while working at Princeton University Computer Center Clinic © 1973. I would post them on this page but I am not sure of the copyright issues with it. If you would like a copy simply email me and I will send it to you. The complete list is,
File_specification Records Description
==============================================================================
FILE1.LST 30541 * Mountain Climber
FILE2.LST 1547 * Picasso's "Portrait of Sylvette"
FILE3.LST 732 * Schopenhaur (Small Cat)
FILE4.LST 2694 * Schopenhaur (Large Cat)
FILE5.LST 2611 * Albert Einstein
FILE6.LST 1308 * Miss Spetember (Small)
FILE7.LST 5136 * Miss September (large)
FILE8.LST 9303 * The Moon
FILE9.LST 1687 * Drapcia Gejewska (Dog)
FILE10.LST 1505 * Drapcia Gejewska (Dog)
FILE11.LST 4718 * Mr. Spock
FILE12.LST 2968 * John Dean
FILE13.LST 3479 * One Giant Step
FILE14.LST 12,405 * Golden Gate Bridge
FILE15.LST 1716 * Beetoven
FILE16.LST 182 * 8 lpi Nude
FILE17.LST 240 Mona Lisa
FILE18.LST 234 DOG
FILE19.LST 169 Swimsuits
FILE20.LST 1132 Nudes on their Stools
FILE21.LST 298 Kennedy
FILE22.LST 344 Bunny Rabbits
FILE23.LST 3446 Banner Porgrams, etc.
FILE24.LST 990 Nudes
FILE25.LST 571 Good Nude, Martini, etc.
FILE26.LST 191 PI
FILE27.LST 3290 Christmas
FILE28.LST 1295 Map of the World
FILE29.LST 280 Nude on a stool
FILE30.LST 1662 Peanuts
FILE31.LST 266 * Alfred E. Newman
FILE32.LST 5198 * Mona Lisa, Overprint
FILE33.LST 840 King Kong
FILE34.LST 270 Spiderman
FILE35.LST 1260 Farrah Fawcett-Majors
FILE36.LST 1200 Johnny Cash
* These must be printed at 8 lines per inch
So there was a lot of it about several years ago. It has occured to me that a program could be written to emulate the process done by these early pioneers. I am not sure exactly how they did it. Of the images that use overstrike they seem to have only 64 or parhaps fewer shades of grey. My own (still imcomplete) program uses roughly 220 shades of grey. Some are not terribly far appart but in genaral the images that I have produced so far look almost OK. I am still working on the page spanning problem. Also because of the change of pixel shape the images needs to be resized. A normal pixel requires to be used 2.153 times. This of course is because a printed pixel is a different shape from an image one. To compensate the image needs extending, or the resultant printout is squashed rather badly. In ray tracing the right factor is usualy 1.333.
Eventaully I want to put a graphics front end on it and be able to select how large to scale the image. At the moment you simply get a one to one type relationship. With the pixels being resized to prevent the image looking wrong. Also only one page is generated but I am sure I will find the time to change it later on.