Forked from ofZach/gist:d67d2ab2a0aa183b7d34f72263d5c5bd
Created
April 9, 2020 21:37
-
-
Save cyrstem/849e94ecb286df637b833efdc3ad3f08 to your computer and use it in GitHub Desktop.
looping 1d noise (tiling)
This file contains hidden or 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