Skip to content

Instantly share code, notes, and snippets.

@runemadsen
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runemadsen/10077991 to your computer and use it in GitHub Desktop.
Save runemadsen/10077991 to your computer and use it in GitHub Desktop.
void setup()
{
size(1000, 800);
translate(0, height/2);
float x = 0;
while(x < width)
{
float y = sin(x/50.0) * 50;
ellipse(x, y, 10, 10);
x += 30;
}
}
void setup()
{
size(1000, 800);
translate(0, height/2);
float x = 0;
beginShape();
while(x < width)
{
float y = sin(x/50.0) * 50;
vertex(x, y);
x += 30;
}
vertex(width, height);
vertex(0, height);
endShape(CLOSE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment