Skip to content

Instantly share code, notes, and snippets.

@starlightme
Created March 6, 2015 13:21
Show Gist options
  • Save starlightme/23546a50edcf542d5e8c to your computer and use it in GitHub Desktop.
Save starlightme/23546a50edcf542d5e8c to your computer and use it in GitHub Desktop.
Processing绘制sin函数
float x=0.0;
float y=200.0;
void setup()
{
size(400,400);
background(0);
}
void draw()
{
ellipse(x,y,10,10);
x=x+0.6;
y=y+sin(0.5*x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment