//--Legrady trigonometric tan demo with look-up table //--05.10.15 int XSIZE = 600; // horizontal size of screen int YSIZE = 600; // vertical size of screen boolean debug = false; int MaxColors = 256; //max range of tones from black to white 0-255 float [][]clr; // declaration that clr will be a 2D array //lookup table generator consisting of a 2Darray with 256 values of r,g,b //the rgb values are created by placing a sinewave into the first location of the array for the RED //then modulating this sinewave by another and putting the results into the 2nd array location for GREEN //then modulating that for the third for the BLUE void LUT() { float freq_r = 0.02;//1.3; //7.3 -- 9 -- use any number, sets color quality float freq_g = 2;//1.2; // 18.9 -- 29 -- use any number, sets colorquality float freq_b = 6;//1.7, 0.7; //9.99 -- 34 -- use any number, sets color quality float amp_r = 2; //1.7; //.6 -- amplitude for each sinewave, controls volume effect float amp_g = .95; //1.3; //0.3 float amp_b = 1.2; //1.0; // 0.6 clr = new float[3][MaxColors]; //initialize clr for (int x=0;x