Fractal
The Newton fractal.
(Not documented)
# File lib/fractals.rb, line 92 def initialize(c=Complex(0.0, 0.0)) super(c, {:a => 1, :pz => lambda { |z| z**3 - 1 }}) do |args| dx_pz = derivative(0.0001) { |x| args[:pz].call(x) } args[:z] = args[:z] - args[:a] * (args[:pz].call(args[:z]) / (dx_pz.call(args[:z]))) end end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.