float PerlinNoise(int x,int y, int z, float scale) { NoiseGenerator = new NoiseGen(cSize,5); float rValue; rValue=NoiseGenerator.GetNoise (((double)x)/scale, ((double)y)/scale, ((double)z)/scale); return rValue; }
int PerlinNoise(int x, int y, int z, float scale, float height, float power) { float rValue; rValue = noiseGen.GetNoise(((double)x) / scale * 10, ((double)y) / scale, ((double)z) / scale / 5); rValue *= height * 5; if (power != 0) { rValue = Mathf.Pow(rValue, power); } return((int)rValue); }