Skip to content

Commit 1b69061

Browse files
committed
Update for SimpleNoise
1 parent a755e21 commit 1b69061

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

external_library/gem/geomerative/library/f_agent/f_agent.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ def initialize(loc:, increment:)
1212

1313
def motion
1414
@offset += increment
15-
loc.dist(Vec2D.new(noise(offset.x) * width, noise(offset.y) * height))
15+
hw = width / 2
16+
hh = height / 2
17+
loc.dist(Vec2D.new((noise(offset.x) + 1) * hw, (noise(offset.y) + 1) * hh))
1618
end
1719

1820
def display(xr:, yr:, m_point:)
1921
no_stroke
20-
fill(255, 73)
21-
dia = (150 / m_point) * 5
22+
fill(255, 100)
23+
dia = (150 / m_point) * 7
2224
# to get weird non-deterministic behaviour of original, created by use of
2325
# negative inputs to a random range surely not intended, use original:-
2426
# ellipse(loc.x + random(-xr, xr), loc.y + random(-yr, yr), dia, dia)
25-
xr *= -1 if xr < 0 # guards against an invalid hi..low range
26-
yr *= -1 if yr < 0
27+
xr *= -1 if xr.negative? # guards against an invalid hi..low range
28+
yr *= -1 if yr.negative?
2729
ellipse(loc.x + rand(-xr..xr), loc.y + rand(-yr..yr), dia, dia)
2830
end
2931
end

external_library/gem/geomerative/library/font_agent/font_agent.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def initialize(location:)
1111

1212
def motion
1313
noise_scale = map1d(mouse_x, (0..width), (0.001..0.01))
14-
noise_z = map1d(mouse_x, (0..height), (frame_count * 0.0003..frame_count * 0.02))
14+
noise_z = map1d(mouse_y, (0..height), (frame_count * 0.0003..frame_count * 0.02))
1515
noise_vector = loc * noise_scale * noise_z
16-
@mot = noise(noise_vector.x, noise_vector.y) * 53
16+
@mot = (noise(noise_vector.x, noise_vector.y) + 1) * 26.5
1717
end
1818

1919
def display(step:)

external_library/gem/geomerative/typo_deform.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env jruby -w
22

3-
43
require 'propane'
54
require 'geomerative'
65

external_library/gem/geomerative/typo_extra_bright.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
# A series of tutorials for using the Geomerative Library
2020
# developed by Ricard Marxer.
2121
# http://www.ricardmarxer.com/geomerative/
22+
# Hold mouse over bottom of `B` to focus, move away to blur
2223
#
23-
# More info on these tutorials and workshops at :
24-
# www.freeartbureau.org/blog
2524
# translated for propane by Martin Prout
2625
class ExtraBright < Propane::App
2726
load_library :f_agent

0 commit comments

Comments
 (0)