App-GUI-Juliagraph

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    color in between. So if you for instance selected 2 and 4, the rainbow
    has a gradient from color 2 to color 3 and a second from 3 to 4. The
    exact colors will be changes on the next page. The gradients might vary
    dependant on chosen "dynamic" and color "space" in which they are
    computed.

    The second section is for people who want only a few color regions. Just
    activate the custom checkbox and select the "Steps" count. If they are
    at 20 only 20 differently colored reagions are drawn. The readonly
    textbox below with the current iteration max is only for better
    orientation. When it is at lets say 60 you know: this scale of one to 60
    possible iteratons will be divided into 20 parts. If the distribution is
    *linear* they all have the size of three. But you might want to skew the
    color distribution. The mapping types are sorted by their skewness.

    If the second section is deactivated you are able to activate the third.
    It is for folks that think that the color gradient is not dense enough.
    That might makes sense if the iteration already stops at maximum of 5
    but you want to get a long smooth gradient. Then you want to *Activate*
    subgradients, based on the Value at iteration stop. The greater that is
    the further on the subgradient the resulting color will be. The five

lib/App/GUI/Juliagraph.pm  view on Meta::CPAN

rainbow goes from begin color number to end color number over every color
in between. So if you for instance selected 2 and 4, the rainbow has a
gradient from color 2 to color 3 and a second from 3 to 4. The exact colors
will be changes on the next page. The gradients might vary dependant on
chosen C<dynamic> and color C<space> in which they are computed.

The second section is for people who want only a few color regions.
Just activate the custom checkbox and select the C<Steps> count. If they
are at 20 only 20 differently colored reagions are drawn. The readonly
textbox below with the current iteration max is only for better orientation.
When it is at lets say 60 you know: this scale of one to 60 possible
iteratons will be divided into 20 parts. If the distribution is I<linear>
they all have the size of three.  But you might want to skew the color
distribution. The mapping types are sorted by their skewness.

If the second section is deactivated you are able to activate the third.
It is for folks that think that the color gradient is not dense enough.
That might makes sense if the iteration already stops at maximum of 5
but you want to get a long smooth gradient. Then you want to I<Activate>
subgradients, based on the Value at iteration stop. The greater that is
the further on the subgradient the resulting color will be. The five

lib/App/GUI/Juliagraph/Compute/Image.pm  view on Meta::CPAN

        @bailout_code,
        '    }', @paint_code,
        '    $y += $delta_y',
        '  }',
        '  $x += $delta_x',
        '}',
    );

    my $code = join '', map { $_ . ";\n"} @code;
    eval $code;
    die "bad iter code - $@ :\n$code" if $@; # say $code;
    #say "compile:",timestr(timediff(Benchmark->new, $t0));

    return $img;
}

1;

lib/App/GUI/Juliagraph/Config.pm  view on Meta::CPAN


sub save {
    my ($self) = @_;
    my $data = $self->{'data'};
    my $file = $self->{'path'};
    open my $FH, '>', $file or return "could not write $file: $!";
    $" = ',';
    for my $key (sort keys %$data){
        my $val = $data->{ $key };
        if (ref $val eq 'ARRAY'){
            say $FH "$key:";
            say $FH "  - $_" for @$val;
        } elsif (ref $val eq 'HASH'){
            say $FH "$key:";
            say $FH "  + $_ = [ @{$val->{$_}} ]" for sort keys %$val;
        } elsif (not ref $val){
            say $FH "$key = $val";
        }
    }
    close $FH;
}


sub get_value {
    my ($self, $key) = @_;
    $self->{'data'}{$key} if exists $self->{'data'}{$key};
}

lib/App/GUI/Juliagraph/Settings.pm  view on Meta::CPAN

        elsif (/\s*(\w+)\s*=\s*(.+)\s*$/){ $data->{$cat}{$1} = $2 }
    }
    close $FH;
    $data;
}

sub write {
    my ($file, $data) = @_;
    open my $FH, '>', $file or return "could not write $file: $!";
    for my $main_key (sort keys %$data){
        say $FH "\n  [$main_key]\n";
        my $subhash = $data->{$main_key};
        next unless ref $subhash eq 'HASH';
        for my $key (sort keys %$subhash){
            say $FH "$key = $subhash->{$key}";
        }
    }
    close $FH;
    0;
}

sub ensure_file_ending {
    my ($file, $ending)  = @_;
    my $ret = $file;
    $ret;



( run in 3.418 seconds using v1.01-cache-2.11-cpan-d7a12ab2c7f )