The inputs are nondescriptive because some of them (particularly the arrays) are used for multiple purposes in order to save on memory. It's not so much how to use if/else statements that I'm looking for - I want to know how to write to a bitmap file. In the Blitz version of the program I did this by choosing a colour, then drawing that pixel on the screen, then finally when all pixels were drawn the program saved the buffer on which the image had been drawn. However, I'd prefer to be able to write to an image file without having to display the image on the screen.
Even more ideal would be to write straight to a PNG, but I'll stick with simple things first.
To give a rough idea of what the program does:
//take inputs;//do some maths;//create and set up 24-bit bitmap file, dimensions k by l, ready to write (not yet done);for(r=0;r<k;r++){ for(s=0;s<l;s++) { //do some more maths; //create pixel at r,l-s-1 coloured using v as in above post (not yet done); //do some more maths; } //do some more maths;}