Skip to content

jeffa/Math-Window2Viewport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math::Window2Viewport

Just another window to viewport mapper. CPAN Version

Synopsis

use Math::Window2Viewport;

my $mapper = Math::Window2Viewport->new(
    Wb => 0, Wt => 1, Wl => 0, Wr => 1,
    Vb => 9, Vt => 0, Vl => 0, Vr => 9,
);

my ($x, $y) = (0.5, 0.6);
my $x2 = $mapper->Dx( $x );
my $y2 = $mapper->Dy( $y );

Examples

The following images were generated by using only primitive move_to and draw_to functions (and labels) without needing to convert degrees to radians, etc.

bar chart

sine wave

sawtooth wave

triangle wave

square wave

Fourier sqaure

See examples for source code.

Installation

To install this module, you should use CPAN. A good starting place is How to install CPAN modules.

If you truly want to install from this github repo, then be sure and create the manifest before you test and install:

perl Makefile.PL
make
make manifest
make test
make install

Support and Documentation

After installing, you can find documentation for this module with the perldoc command.

perldoc Math::Window2Viewport

You can also find documentation at metaCPAN.

License and Copyright

See source POD.

About

Just another window to viewport mapper.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages