Sha256: 6b47e6b3031d3d918cfa59f04cd70570b5d42a2969de99f9eee23e7537fd67f9

Contents?: true

Size: 649 Bytes

Versions: 5

Compression:

Stored size: 649 Bytes

Contents

# by Martin Prout

require 'cf3'

def setup_the_sun
  @sun = ContextFree.define do

    shape :start do
      rot = 0
      split do
        12.times do
          legs rotation: rot
          rot += 30
          rewind
        end
        legs rotation: 360
      end
    end

    shape :legs do
      circle
      legs rotation: 1, y: 0.1,
      size: 0.973, color: [0.22, 0.15]
    end

  end
end

def setup
  size 600, 600
  setup_the_sun
  no_stroke
  color_mode HSB, 1.0
  draw_it
end

def draw
  # Do nothing.
end

def draw_it
  background 0.7
  @sun.render :start, size: height/7,  stop_size: 0.8,
  start_x: width/2, start_y: height/2
end


Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cf3-0.0.5 samples/dark_star.rb
cf3-0.0.4 samples/dark_star.rb
cf3-0.0.3 samples/dark_star.rb
cf3-0.0.2 samples/dark_star.rb
cf3-0.0.1 samples/dark_star.rb