Color Graph Readme Author: Jeffery Wright Version 0.0.1 Color Graph is an attempt to generalize previous little programs I've written that use the ASCII version of the Portable Pixelmap format to generate images based on some numerical pattern. All previous programs I've written in this vein hardcoded everything, so changing the image generated required editing the source code and recompiling. This initial public version has the following features: *Lets the user set a base filename for the output(the .ppm filename extension is added automatically). *Lets the user select the height and width of the output images. *Generates a set of 4 images based on the following equations: r = ax + by + c g = ax + by + c b = ax + by + c With one image for each color individually and one for the three combined. The component images are named with their color appeneded to the end of the user selected filename. *Lets the user select the x and y coefficients for each color channel as well as the constant(referred to as the baseline in the program's prompts). At present, these are restricted to integer values. *Evaluates the equations for each integer ordered pair(x,y) using half of the height and width for the positive and negative limits. If Height and Width are even, the lines x=0 and y=0 are skipped. Future versions might replace these predetermined bounds calculated from height and width with user selected bounds and calculating height and width from bounds. *A text-based interface that prompts the user for each parameter and accepts keyboard input. *Keeps output in the right range by taking the absolute value of the equations to keep subpixel values positive and taking the modulus 256 to keep values from getting too large. Files available to the public include: Readme.txt: This readme. ColorGraph.cpp: the source code. ColorGraph-0.0.1.bin: A binary executable compiled on Debian Testing amd64 using g++ version 13. A smattering of optimized .png files converted from .ppm files generated as a test of the program. I have only tested this program on 64-bit Debian, but have no reason to expect issues compiling and running on other versions of Debian, other distros of Linux, any version of Windows, or on MAC OSX. At the same time, I can offer no advice for compiling on anything other than a Linux box and have no idea how to cross-compile for Windows or OSX. Also, due to being blind, my ability to test is limited. I can confirm the program compiles, runs, prints the correct user prompts, accepts reasonable inputs, and outputs valid Portable Pixelmap files, but I can say very little about the actual contents of the output files. You will need external software to either view the output files or convert them to a more widely supported format. As the files are ASCII-based, they can be viewed in a text editor, but all you'll see is a super short header followed by a bunch of RGB triplets printed as space delimited decimal numbers, one pixel per line. Fellow Linux users can use optipng to convert the output files to optimized png files, but I don't know if optipng is available for Windows or OSX, so non-Linux users are on their own. All of my programmatically generated images were converted using optipng with the -o7 preset. Features I hope to implement soon: *the option to apply a mask that cancels out a color if it isn't divisible by a user defined value. Masking red by 2, green by 3, and blue by 5 is in the code, though commented out for the pre-built binary, so it's mostly a matter of adding the prompts to the user. *The ability to pick from more than one kind of equation. The most obvious choice would be to optionally take the absolute value of ax or by or to allow for quadratic or cubic terms. *Implement the option to generate multiple images that could then be joined into an animation. *Implementing an output file that stores the parameters used in a human readable format. Features that are more long term projects in their own right: *A better interface. *Being able to input any equation, even one with non-integer outputs. *Drawing traditional cartesian, parametric, and polar graphs over the color graph. *Adding alpha channels to images and generating voxel graphics.