public void marble() { Noise noise = new Noise(framesize,framesize); if (mBufferedImage != null) { for (int i=0; i 11) { d = Math.abs(d - ((int) (d/17))*17 - 10.5)*0.1538462; i = 0.4 + 0.3*d + /* add gradient to middle value bands */ 0.2*noise.linear(u/10.,v/10.); /* add noise to middle value bands */ } else i = 0.2 + 0.3*noise.linear(u/10.,v/5.); // add noise to darkest band int r = (int) ( 0.4 * i * 255); int g = (int) ( 0.8 * i * 255); int b = (int) ( 0.6 * i * 255); return (new Color(r,g,b)).getRGB(); }