App-GUI-Harmonograph
view release on metacpan or search on metacpan
The sixth row mirrors the first but with 2 distinctions. Its not about
integer values but percentage values of the original pendulum length.
This length will be calculated by the program for opimal display. Thi
slider helps you only to change the proportions of the amplitude towards
the other pendula. Natural constants are also here available as a factor
and behind the on the most right is a button to reset the radius to 100
percent.
The seventh row is the amplitude size, which simple allows to make the
picture larger or smaller depending if the pendulum left the frame or
doesn't move enough. As with reqency, also the amplitude can be damped
over time and this damping can accelerated.
Row eight and nine are exact copies of row three and four, they just
affect the radius / amplitude.
Functions
This tab lets you meddle with the equations that compute the mechanics
of a pendulum. Because all ten rows are built the same I will explain
only one. For instance the X pendulum has only influence on the x
lib/App/GUI/Harmonograph.pm view on Meta::CPAN
use utf8;
use FindBin;
our $NAME = __PACKAGE__;
our $VERSION = '1.03';
use base qw/Wx::App/;
use App::GUI::Harmonograph::Frame;
sub OnInit {
my $app = shift;
my $frame = App::GUI::Harmonograph::Frame->new( undef, 'Harmonograph '.$VERSION);
$frame->Show(1);
$frame->CenterOnScreen();
$app->SetTopWindow($frame);
1;
}
sub OnQuit { my( $self, $event ) = @_; $self->Close( 1 ); }
sub OnExit { my $app = shift; 1; }
1;
__END__
lib/App/GUI/Harmonograph.pm view on Meta::CPAN
The sixth row mirrors the first but with 2 distinctions. Its not about
integer values but percentage values of the original pendulum length.
This length will be calculated by the program for opimal display.
Thi slider helps you only to change the proportions of the amplitude
towards the other pendula. Natural constants are also here available as
a factor and behind the on the most right is a button to reset the
radius to 100 percent.
The seventh row is the amplitude size, which simple allows to make the
picture larger or smaller depending if the pendulum left the frame or
doesn't move enough. As with reqency, also the amplitude can be damped
over time and this damping can accelerated.
Row eight and nine are exact copies of row three and four, they just
affect the radius / amplitude.
=head2 Functions
=for HTML <p>
lib/App/GUI/Harmonograph/Frame/Panel/ColorPicker.pm view on Meta::CPAN
use Wx;
use base qw/Wx::Panel/;
use App::GUI::Wx::Widget::Custom::ColorDisplay;
sub new {
my ( $class, $parent, $colors ) = @_;
return unless ref $parent and ref $colors eq 'HASH';
my $self = $class->SUPER::new( $parent, -1 );
$self->{'colors'} = { %$colors }; # $frame->{'config'}->get_value('color')
$self->{'color_names'} = [ sort keys %{$self->{'colors'}} ];
$self->{'color_index'} = 0;
my $btnw = 46; my $btnh = 17;# button width and height
$self->{'select'} = Wx::ComboBox->new( $self, -1, $self->current_color_name, [-1,-1], [170, -1], $self->{'color_names'});
$self->{'<'} = Wx::Button->new( $self, -1, '<', [-1,-1], [ 30, 17] );
$self->{'>'} = Wx::Button->new( $self, -1, '>', [-1,-1], [ 30, 17] );
$self->{'load'} = Wx::Button->new( $self, -1, 'Load', [-1,-1], [$btnw, $btnh] );
$self->{'del'} = Wx::Button->new( $self, -1, 'Del', [-1,-1], [$btnw, $btnh] );
$self->{'save'} = Wx::Button->new( $self, -1, 'Save', [-1,-1], [$btnw, $btnh] );
( run in 0.509 second using v1.01-cache-2.11-cpan-e1769b4cff6 )