public override float GetNoise(float x, float y, float z)
        {
            float n = GetNoise(x * frequencyX, y * frequencyY, z);

            if (radial)
            {
                n = NoiseSampler.ShiftInterval(-1, 1, Mathf.PI, 0, n);
            }
            return(Mathf.Cos(n * amplitude));
        }
        public override float GetNoise(float x, float y, float z)
        {
            float v = this.source.GetNoise(x, y, z);

            return(NoiseSampler.CreateTerraces(v, width));
        }
 public SineFunction(NoiseSampler noise, float frequencyX, float frequencyY)
 {
     this.noise      = noise;
     this.frequencyX = frequencyX;
     this.frequencyY = frequencyY;
 }
Beispiel #4
0
 public static BrownianFunction Mountains(NoiseSampler source)
 {
     return(new BrownianFunction(source, 0.01f, 5));
 }