Sha256: faa913b4ed97567c19d3d8e68b71ff9b3c3d5d336213a94e74baa7c45db9fc5f

Contents?: true

Size: 319 Bytes

Versions: 10

Compression:

Stored size: 319 Bytes

Contents

# Noise1D. 
# 
# Using 1D Perlin Noise to assign location. 


def setup  
  size 640, 360  
  @xoff = 0.0
  @x_increment = 0.01  
  background 0
  no_stroke  
end

def draw  
  fill 0, 10
  rect 0, 0, width, height  
  n = noise(@xoff) * width  
  @xoff += @x_increment  
  fill 200
  ellipse n, height/2, 64, 64  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.6.2 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.6.1 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.6.0 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.5.1 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.5.0 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.4.4 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.4.3 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.4.2 samples/processing_app/basics/math/noise_1_d.rb
ruby-processing-2.4.1 samples/processing_app/basics/math/noise_1_d.rb