Created
June 1, 2010 22:15
-
-
Save nervoussystem/421597 to your computer and use it in GitHub Desktop.
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
| //vary noise discretely to approximate gradient | |
| float xGradient = (noise(x+DELTA,y)-noise(x-DELTA,y))/(2*DELTA); | |
| float yGradient = (noise(x,y+DELTA)-noise(x,y-DELTA))/(2*DELTA); | |
| particle.position().add(noiseStrength*xGradient, noiseStrength*yGradient,0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment