We are about to switch to a new forum software. Until then we have removed the registration on this forum.
psu.edu/Rayleigh surface waves
i want to achieve this kind of generated pattern to generate a wave grid. Since its a wave it needs a Sin but there is also a change in horizontal spacing and vertical amplitude.
What kind of formulae should i looking for?
what i got so far is:
int x;
int y;
int w = 5;
int h = 5;
int col = -1;
int row = 0;
void setup()
{
size (500, 500);
frameRate(10);
}
void draw()
{
if (row>=11) return; // finished
if (++col>=28) { row++; col=0; }
pushMatrix();
translate(100,100);
x = col*10; y = row*10 + round(5*sin(x));
print(sin(row)+" ");
ellipse(x,y,w,h);
popMatrix();
}
Answers
I'll begin by giving out a hint. That's all I can do at the moment.
Notice that the topmost particles move in a circle, and the lower they get, the more oval-ish their trajectory gets.
Just tweak it a little bit for your purpose