Skip to content

Instantly share code, notes, and snippets.

@ofZach
Created November 27, 2017 07:44
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ofZach/d67d2ab2a0aa183b7d34f72263d5c5bd to your computer and use it in GitHub Desktop.
Save ofZach/d67d2ab2a0aa183b7d34f72263d5c5bd to your computer and use it in GitHub Desktop.
looping 1d noise (tiling)
ofPolyline temp;
float ff = ofGetElapsedTimef();
for (int i = 0; i < 100; i++){
float angle = ofMap(i, 0, 100, 0, TWO_PI);
ofPoint pt= ofPoint(400,400);
float radius = 200 + ofSignedNoise(ff*0.1, cos(angle)*0.3, sin(angle)*0.3) * 100;
pt += radius * ofPoint(cos(angle), sin(angle));
temp.addVertex(pt);
}
temp.setClosed(true);
temp.draw();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment