Created
November 27, 2017 07:44
-
-
Save ofZach/d67d2ab2a0aa183b7d34f72263d5c5bd to your computer and use it in GitHub Desktop.
looping 1d noise (tiling)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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