Class: Fractals::Julia
- Inherits:
-
Fractal
- Object
- Renderers::Base
- Fractal
- Fractals::Julia
- Defined in:
- lib/fractals.rb
Overview
The Julia set 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.36, 0.1)) ⇒ Julia
constructor
A new instance of Julia.
Methods inherited from Fractal
Methods inherited from Renderers::Base
acts_as_renderer, #in_set?, #render, #renderer=, #where_is?
Constructor Details
#initialize(c = Complex(0.36, 0.1)) ⇒ Julia
74 75 76 77 78 |
# File 'lib/fractals.rb', line 74 def initialize(c=Complex(0.36, 0.1)) super(c, {:p => 2}) do |args| args[:z] = args[:z]**args[:p] + c end end |