Class: Fractals::BurningShip
- Inherits:
-
Fractal
- Object
- Renderers::Base
- Fractal
- Fractals::BurningShip
- Defined in:
- lib/fractals.rb
Overview
Michael Michelitsch’s Burning Ship fractal.
Instance Attribute Summary
Attributes inherited from Fractal
Attributes inherited from Renderers::Base
#algorithm, #bailout, #height, #last_iteration, #magnification, #max_iterations, #set_color, #theme, #width
Instance Method Summary collapse
-
#initialize(c = Complex(-0.3, -0.5)) ⇒ BurningShip
constructor
A new instance of BurningShip.
Methods inherited from Fractal
Methods inherited from Renderers::Base
acts_as_renderer, #in_set?, #render, #renderer=, #where_is?
Constructor Details
#initialize(c = Complex(-0.3, -0.5)) ⇒ BurningShip
Returns a new instance of BurningShip.
64 65 66 67 68 69 |
# File 'lib/fractals.rb', line 64 def initialize(c=Complex(-0.3, -0.5)) super(c, {:p => 2}) do |args| args[:z] = (args[:z].real.abs + sqrt(-1) * args[:z].image.abs)**args[:p] + args[:c] end end |