2021-01-11 01:32

Noise discontinuity

I have made some experiments with the FastLed Noise functions (especially with the 1D version, FastLed Version 3.1.3) and I have found that there are points of discontinuity at the zero crossing points of the curve. As far as I understand the Perlin Noise function, the curve has to cross the zero line at regular steps (every 256 increments in the FastLed implementation), whereby there are pseudorandom gradients for each zero crossing. Between these points the algorithm should interpolate the curve smoothly, like shown in this diagram https://www.scratchapixel.com/images/upload/noise-part-2/noise-value-vs-perlin3.png? The gradients should assure a smooth transitions between the preceding section and the subsequent section of the curve. It seems that this is not the case in this implementation, as there is a sharp edge at the zero crossing points, which means the gradient changes at the transition of the preceding section and the subsequent section of the curve. Example code (best view the output with the serial plotter of the arduino IDE):


void setup() { Serial.begin(9600); }

void loop() { static int cnt = 0;

Serial.print(-128); Serial.print("\t"); Serial.print(128); Serial.print("\t");

btw: I've also played with the Noise functions of processing. Here this is not the case.


  • 点赞
  • 回答
  • 收藏
  • 复制链接分享