-- Noboru Matsuo 03-03-04 Algorithmic Visualization #1 global ToneRANGE global clr on Startmovie LookupTable() pause end On LookupTable() clr = [[],[],[]] ToneRANGE = 256 tone1 = random(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251) tone2 = random(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251) tone3 = random(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251) repeat with x = 1 to ToneRANGE -1 clr[1][x] = (ToneRANGE)*(cos((tone1* pi())*x/ToneRANGE)) clr[2][x] = (ToneRANGE)*(cos((tone2* pi())*x/ToneRANGE)) clr[3][x] = (ToneRANGE)*(cos((tone3* pi())*x/ToneRANGE)) end repeat dotexture end on dotexture TRange = 1 midtone = 255 repeat with x = 1 to 800 repeat with y = 1 to 600 sx = abs(((10*pi())*x)/800) sy = tan(((33*pi())*y)/600) z = (Trange*(sx*sy)) + midtone z = max(min(z,255),1) (the stage).image.setpixel(x,y,rgb(clr[1][z],clr[2][z],clr[3][z])) end repeat updatestage end repeat end on mouseUp me member(3).image = (the stage).image duplicate member(3) end