public void stonespaint ()
	// Create the (beauty) images of the stones (black and white)
	{
		int col = GF.boardColor().getRGB();
		int blue = col & 0x0000FF, green = (col & 0x00FF00) >> 8, red = (col & 0xFF0000) >> 16;
		boolean Alias = GF.getParameter("alias", true);
		if (BlackStone == null || BlackStone.getWidth(this) != D + 2)
		{
			int d = D + 2;
			int pb[] = new int[d * d];
			int pw[] = new int[d * d];
			int i, j, g, k;
			double di, dj, d2 = d / 2.0 - 5e-1, r = d2 - 2e-1, f = Math.sqrt(3);
			double x, y, z, xr, xg, hh;
			k = 0;
			if (GF.getParameter("smallerstones", false)) r -= 1;
			for (i = 0; i < d; i++)
				for (j = 0; j < d; j++)
				{
					di = i - d2;
					dj = j - d2;
					hh = r - Math.sqrt(di * di + dj * dj);
					if (hh >= 0)
					{
						z = r * r - di * di - dj * dj;
						if (z > 0)
							z = Math.sqrt(z) * f;
						else z = 0;
						x = di;
						y = dj;
						xr = Math.sqrt(6 * (x * x + y * y + z * z));
						xr = (2 * z - x + y) / xr;
						if (xr > 0.9)
							xg = (xr - 0.9) * 10;
						else xg = 0;
						if (hh > pixel || !Alias)
						{
							g = (int)(10 + 10 * xr + xg * 140);
							pb[k] = 255 << 24 | g << 16 | g << 8 | g;
							g = (int)(200 + 10 * xr + xg * 45);
							pw[k] = 255 << 24 | g << 16 | g << 8 | g;
						}
						else
						{
							hh = (pixel - hh) / pixel;
							g = (int)(10 + 10 * xr + xg * 140);
							double shade;
							if (di - dj < r / 3)
								shade = 1;
							else shade = shadow;
							pb[k] = 255 << 24
								| (int)((1 - hh) * g + hh * shade * red) << 16
								| (int)((1 - hh) * g + hh * shade * green) << 8
								| (int)((1 - hh) * g + hh * shade * blue);
							g = (int)(200 + 10 * xr + xg * 45);
							pw[k] = 255 << 24
								| (int)((1 - hh) * g + hh * shade * red) << 16
								| (int)((1 - hh) * g + hh * shade * green) << 8
								| (int)((1 - hh) * g + hh * shade * blue);
						}
					}
					else pb[k] = pw[k] = 0;
					k++;
				}
			BlackStone = createImage(new MemoryImageSource(d, d, ColorModel
				.getRGBdefault(), pb, 0, d));
			WhiteStone = createImage(new MemoryImageSource(d, d, ColorModel
				.getRGBdefault(), pw, 0, d));
		}
	}