No description or website provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin autofix by rubocop Dec 11, 2018
exe update README usage with terminal Dec 12, 2018
lib autofix by rubocop Dec 14, 2018
resources fix #1 Dec 12, 2018
spec autofix by rubocop Dec 11, 2018
.gitignore start using rspec Dec 11, 2018
.rspec start using rspec Dec 11, 2018
Gemfile autofix by rubocop Dec 11, 2018
README.md autofix by rubocop Dec 14, 2018
Rakefile autofix by rubocop Dec 11, 2018
gray_scott_gtk3.gemspec autofix by rubocop Dec 14, 2018

README.md

Gray-Scott

screenshot

Requirements

  • Ruby
  • Numo/NArray
  • Ruby/Gtk3

Installation

$ gem install gray_scott_gtk3

Usage

$ grayscott 40 # msec

$ grayscott 40 -w 256 -h 256 # size of model. display is fixed to 512 x 512 pixels.

Usage with terminal(example)

$ bundle install

$ bundle exec bin/console

GrayScottGtk3::Controller::MSEC = 50
c = GrayScottGtk3::Controller.new 'resources/', width:1024, height:1024

# custom feed / kill ratio
na = Numo::SFloat.new(1024,1).seq + 10 # avoid zero
na = na * Numo::SFloat.ones(1, 1024)
na = na / na.max
f = na * 0.05
k = na.transpose * 0.06 + 0.01
c.model.f = f
c.model.k = k
c.model.v.rand(0.0, 0.15)
c.color = 'green' # colorful is slow. 
Gtk.main

screenshot

Known issue

Glib::Timeout.add(number_of_seconds) If processing can not be completed within the time, it will not be displayed. In this case, you should increase the number of seconds.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kojix2/Gray-Scott.