Hi everyone, I have been trying to connect two or more waves generated with the noise() function. The idea is to get one continuous wave with specific areas having more/less noise added to them. Is there a simple way to connect two or more waves?
I would think it either requires interpolating the ending point of the first wave and the starting point of the next, or making sure that each of the waves starts and ends at the same spot. However, I have not been able to figure out both.
A simple piece of code illustrating the problem is shown below:
void setup() {
size(800, 800);
}
void draw() {
float x = 0;
while (x < width/2) {
point(x, 300 + 200 * noise(x / 30));
x = x + 1;
}
while (x >= width/ 2 & x < width) {
point(x, 300 + 100 * noise(x / 30));
x = x + 1;
}
}