gitpan / math-gmatrix Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for Math-GMatrix
Home Page: http://metacpan.org/release/Math-GMatrix
Read-only release history for Math-GMatrix
Home Page: http://metacpan.org/release/Math-GMatrix
NAME Math::GMatrix - Extension of Math::Matrix for (2D graphics-)vector manipulation SYNOPSIS use Math::GMatrix; DESCRIPTION The following methods are available: new Constructor arguments are a list of references to arrays of the same length. The arrays are copied. The method returns undef in case of error. $a = new Math::Matrix ([rand,rand,rand], [rand,rand,rand], [rand,rand,rand]); As s special case you can pass a single argument 'I' for getting an identity matrix. If you call "new" as method, a zero filled matrix with identical deminsions is returned. xform You can transform one or more vectors by calling: @V1=(1.5,3.7); @V2 = $M->xform(@V1); @L1=( [1.5,3.7], [4.6,6.8], [5.1,-0.7] ); @L2 = $M->xform(@L1); translate You can pan (move by x and y offset) your graphics by calling: $M2 = $M->translate(2.5,10.2); rotate You can rotate your graphics by calling: $M2 = $M->rotate(-90); scale You can scale (factor_x and factor_y) your graphics by calling: $M2 = $M->rotate(2,2); EXAMPLE @ListOfVectors = [ [0,1], [3,5], [2,7], [8,-1] ]; $paperwidth = 21; # DIN A4 is 21x29.7 cm $M = new Math::Matrix('I'); # get an identity matrix $M = $M->translate(-1,-1)->rotate(90)->translate($paperwidth-1,1); @Result = $M->xform(@ListOfVectors); AUTHOR A. Cester, <[email protected]>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.