Sha256: cda7db0da56316fa28423dcf8ba2fa8b19eb5fe577048cf06e1ad3e76a91c8e2

Contents?: true

Size: 889 Bytes

Versions: 9

Compression:

Stored size: 889 Bytes

Contents

#
# a translation from a processing example
# http://vormplus.be/weging/an-introduction-to-processing/
#
Shoes.app :width => 420, :height => 420, :resizable => false do
  stage, wide, sw, basesize, step = 0, 3.0, 1.0, 600, 60
  stroke gray(127)
  nofill

  animate 40 do |i|
    stage = (1...8).rand if i % 40 == 0
    rotation = -(HALF_PI / wide)
    clear do
      background gray(240)
      10.times do |i|
        strokewidth sw * i
        size = (basesize / 3) + ((step / 3) * i)
        shape do
          arc self.width / 2, self.height / 2,
              size, size,
              rotation * i, rotation * i + TWO_PI - HALF_PI
        end
      end
    end

    case stage
    when 1; wide -= 0.1
    when 2; wide += 0.1
    when 3; basesize -= 1
    when 4; basesize += 2
    when 5; sw += 0.1
    when 6; sw -= 0.01
    when 7; step += 2
    else    step -= 1
    end
  end
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
scarpe-0.4.0 examples/legacy/not_checked/shoes-contrib/good/good-arc.rb
scarpe-0.3.0 examples/legacy/not_checked/shoes-contrib/good/good-arc.rb
scarpe-0.2.2 examples/legacy/not_checked/shoes-contrib/good/good-arc.rb
lacci-0.2.1 examples/legacy/not_checked/shoes-contrib/good/good-arc.rb
scarpe-0.2.1 examples/legacy/not_checked/shoes-contrib/good/good-arc.rb
scarpe-0.2.0 examples/legacy/not_checked/shoes-contrib/good/good-arc.rb
shoes-3.0.1 samples/good-arc.rb
shoesgem-0.1514.0 shoes/samples/good-arc.rb
shoesgem-0.1424.0 shoes/samples/good-arc.rb