public static Polygon newRandom(final int length, final RandomGenerator random) {
		Requires.positive(length);
		final Polygon p = new Polygon(length);

		p._data[0] = random.nextFloat(); // r
		p._data[1] = random.nextFloat(); // g
		p._data[2] = random.nextFloat(); // b
		p._data[3] = max(0.2F, random.nextFloat()*random.nextFloat()); // a

		float px = 0.5F;
		float py = 0.5F;
		for (int k = 0; k < length; k++) {
			p._data[4 + 2*k] = px = clamp(px + random.nextFloat() - 0.5F);
			p._data[5 + 2*k] = py = clamp(py + random.nextFloat() - 0.5F);
		}
		return p;
	}
Creates a new random Polygon of the given length.
jenetics.example/src/main/java/io/jenetics/example/image/Polygon.java