Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

defolderize

  • Loading branch information...
commit fafc22dd74a50555bb6c2b359cb262acc9cc2ef2 1 parent 9b97881
@jdf authored
View
15 examples.py/Basics/Math/NoiseWave/NoiseWave.py → examples.py/Basics/Math/NoiseWave.py
@@ -1,10 +1,10 @@
"""
Noise Wave
- by Daniel Shiffman.
-
- Using Perlin Noise to generate a wave-like pattern.
+ by Daniel Shiffman.
+
+ Using Perlin Noise to generate a wave-like pattern.
"""
-
+
xspacing = 8 # How far apart should each horizontal location be spaced
yoff = 0.0 # 2nd dimension of perlin noise
@@ -27,14 +27,14 @@ def calcWave():
dx = 0.05
dy = 0.01
amplitude = 100.0
-
+
# Increment y ('time')
global yoff
yoff += dy
-
+
#xoff = 0.0 # Option #1
xoff = yoff # Option #2
-
+
for i in range(len(yvalues)):
# Using 2D noise function
#yvalues[i] = (2*noise(xoff,yoff)-1)*amplitude
@@ -49,4 +49,3 @@ def renderWave():
fill(255, 50)
ellipseMode(CENTER)
ellipse(x * xspacing, width / 2 + v, 16, 16)
-
View
2  examples.py/Basics/Math/NoiseField/noisefield.py → examples.py/Basics/Math/noisefield.py
@@ -1,7 +1,7 @@
"""
noisefield.py - demonstrate Perlin noise
Jonathan Feinberg
-"""
+"""
srcSize = 50
destSize = 400
g = createGraphics(srcSize, srcSize, JAVA2D)
Please sign in to comment.
Something went wrong with that request. Please try again.