<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7963240914776532463</id><updated>2011-04-21T14:58:53.328-07:00</updated><title type='text'>Processing Matrix Library</title><subtitle type='html'>A library of matrix operations for the processing development environment.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pmatrix.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7963240914776532463/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pmatrix.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7963240914776532463.post-7279859387843323412</id><published>2007-09-17T15:54:00.000-07:00</published><updated>2007-09-22T12:00:30.931-07:00</updated><title type='text'>How to use Matrixmath</title><content type='html'>The MatrixMath library will let you perform a number of different matrix operations. The following post describes the functions available to users of the pMatrix library.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pratt.edu/%7Efbitonti/pmatrix/matrix.zip"&gt;&lt;/a&gt;&lt;a href="http://pratt.edu/%7Efbitonti/pmatrix/matrix.txt"&gt;Source Code&lt;/a&gt;&lt;br /&gt;&lt;a href="http://pratt.edu/%7Efbitonti/pmatrix/matrix.zip"&gt;&lt;span style="font-weight: bold;"&gt;download v1.1&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;SAMPLE:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;import matrixMath.*;&lt;br /&gt;&lt;br /&gt;float[][] numbers = new float[2][3];&lt;br /&gt;numbers[0][0] = 1;&lt;br /&gt;numbers[0][1] = 2;&lt;br /&gt;numbers[0][2] = 3;&lt;br /&gt;numbers[1][0] = 4;&lt;br /&gt;numbers[1][1] = 4;&lt;br /&gt;numbers[1][2] = 4;&lt;br /&gt;&lt;br /&gt;float[][] numbers2 = new float[3][3];&lt;br /&gt;numbers2[0][0] = 1;&lt;br /&gt;numbers2[0][1] = 2;&lt;br /&gt;numbers2[0][2] = 3;&lt;br /&gt;numbers2[1][0] = 2;&lt;br /&gt;numbers2[1][1] = 2;&lt;br /&gt;numbers2[1][2] = 2;&lt;br /&gt;&lt;br /&gt;matrixMath a = new matrixMath(numbers);&lt;br /&gt;&lt;br /&gt;a.setNumber(0,2,5);&lt;br /&gt;&lt;br /&gt;matrixMath aResult = new matrixMath(numbers2);&lt;br /&gt;&lt;br /&gt;println(aResult.getNumber(0,0));&lt;br /&gt;&lt;br /&gt;//println(a.give);&lt;br /&gt;aResult = matrixMath.scalePoint(aResult,2,2,2);&lt;br /&gt;&lt;br /&gt;println(a.getNumber(0,2));&lt;br /&gt;println(aResult.getNumber(0,0));&lt;br /&gt;println(aResult.getNumber(0,1));&lt;br /&gt;println(aResult.getNumber(0,2));&lt;br /&gt;println(aResult.getNumber(1,0));&lt;br /&gt;println(aResult.getNumber(1,1));&lt;br /&gt;println(aResult.getNumber(1,2));&lt;br /&gt;&lt;br /&gt;a = matrixMath.addSquareMatrix(a,aResult);&lt;br /&gt;&lt;br /&gt;print("\n");&lt;br /&gt;print("\n");&lt;br /&gt;print("\n");&lt;br /&gt;println(a.sizeCol());&lt;br /&gt;println(a.sizeRow());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;println(aResult.getNumber(0,0));&lt;br /&gt;println(aResult.getNumber(0,1));&lt;br /&gt;println(aResult.getNumber(0,2));&lt;br /&gt;println(aResult.getNumber(1,0));&lt;br /&gt;println(aResult.getNumber(1,1));&lt;br /&gt;println(aResult.getNumber(1,2));&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;isize; i="i+1)" int="" j="0;"&gt;&lt;isize; j="j+1)"&gt;&lt;/isize;&gt;&lt;/isize;&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7963240914776532463-7279859387843323412?l=pmatrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7963240914776532463/posts/default/7279859387843323412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7963240914776532463/posts/default/7279859387843323412'/><link rel='alternate' type='text/html' href='http://pmatrix.blogspot.com/2007/09/how-to-use-pmatrix.html' title='How to use Matrixmath'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-7963240914776532463.post-8391803252914912581</id><published>2007-09-15T20:08:00.000-07:00</published><updated>2007-09-22T11:48:41.166-07:00</updated><title type='text'>Currently Available Functions</title><content type='html'>&lt;p class="MsoNormal"&gt;The following is a list of operations you can perform with the library and brief description of how to use them.&lt;/p&gt;  &lt;p style="font-style: italic;" class="MsoNormal"&gt;note: the term "square  matrix" in the function name only means that each matrix needs to be of the same dimension not that they need to be of equal height and width.&lt;/p&gt;&lt;br /&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;matrixMath&lt;/span&gt;(float matrix_[][])&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public void &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;setNumber&lt;/span&gt;(int i, int j, float value)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public float &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;getNumber&lt;/span&gt;(int i, int j)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public int &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;sizeRow&lt;/span&gt;()&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public int &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;sizeCol&lt;/span&gt;()&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;copy&lt;/span&gt;()&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;buildMatrx&lt;/span&gt;(int row, int col)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;this function will create an nxn matrix and set all values to zero&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;the following functions will allow you to transform arrays of points of nx3 dimension.&lt;br /&gt;&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;scalePoint&lt;/span&gt;(matrixMath x,int scaleX, int scaleY, int scaleZ)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;transPoint&lt;/span&gt;(matrixMath x,int transX, int transY, int transZ)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;shearPoint&lt;/span&gt;(matrixMath x,int shearX, int shearY, int shearZ)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;rotateXPoint&lt;/span&gt;(matrixMath x,int rotX)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;rotateYPoint&lt;/span&gt;(matrixMath x,int rotY)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;rotateZPoint&lt;/span&gt;(matrixMath x,int rotZ)&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;Identity matrix: This function will produce an identity matrix of a chosen size.&lt;/p&gt;            &lt;p class="MsoNormal"&gt;1000&lt;br /&gt;0100&lt;br /&gt;0010&lt;br /&gt;0001&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;identityMatrix&lt;/span&gt;(int matrixSize)&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;            &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Multiply matrix: Multiply two matrices.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;1234---4567&lt;span style=""&gt;          &lt;/span&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;br /&gt;1234-&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;*&lt;/span&gt;&lt;/span&gt;-4567&lt;br /&gt;1234&lt;span style=""&gt;---&lt;/span&gt;4567&lt;br /&gt;1234&lt;span style=""&gt;---&lt;/span&gt;4567&lt;/p&gt;&lt;p class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;multiplySquareMatrix&lt;/span&gt;(matrixMath matrixA, matrixMath matrixB)&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;  &lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Multiply 1 X N matrix: Multiply two matrices of different dimension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p class="MsoNormal"&gt;4&lt;span style=""&gt;&lt;/span&gt;---4567&lt;span style=""&gt;    &lt;/span&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;br /&gt;4-&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;*&lt;/span&gt;&lt;/span&gt;-4567&lt;br /&gt;4---4567&lt;br /&gt;4---4567&lt;/p&gt;      &lt;p class="MsoNormal"&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;columnMultiplyMatrix&lt;/span&gt;(float matrixA[],matrixMath matrixB)&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Scale matrix: Scale one matrix.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;        &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;              &lt;/span&gt;&lt;span style=""&gt;    &lt;/span&gt;4---567&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;br /&gt;4-&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;*&lt;/span&gt;&lt;/span&gt;-4567&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;         &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;4---567&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;       &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;4---567&lt;/p&gt;    &lt;p class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;scaleSquareMatrix&lt;/span&gt;(matrixMath matrixA, matrixMath matrixB,int scaleFactor)&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;b style=""&gt;Add matrix: Add two matrices.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;          &lt;p class="MsoNormal"&gt;1234---4567&lt;span style=""&gt;          &lt;/span&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;br /&gt;1234-&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;+&lt;/span&gt;&lt;/span&gt;-4567&lt;br /&gt;1234---4567&lt;br /&gt;1234---4567&lt;/p&gt;    &lt;p class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;addSquareMatrix&lt;/span&gt;(matrixMath matrixA, matrixMath matrixB)&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Subtract matrix: subtract two matrices.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;          &lt;p class="MsoNormal"&gt;1234---4567&lt;span style=""&gt;         &lt;/span&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;br /&gt;1234-&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;/span&gt;-4567&lt;br /&gt;1234---4567&lt;br /&gt;1234---   &lt;span style=""&gt;         &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;4567&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;subtractSquareMatrix&lt;/span&gt;(matrixMath matrixA, matrixMath matrixB)&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;  &lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Transpose matrix: transpose rows and columns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p class="MsoNormal"&gt;1234---1111&lt;span style=""&gt;          &lt;/span&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;br /&gt;1234-&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;=&lt;/span&gt;&lt;/span&gt;-2222&lt;br /&gt;1234---3333&lt;br /&gt;1234---4444&lt;/p&gt;    &lt;p class="MsoNormal"&gt;public static matrixMath &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;transposeMatrix&lt;/span&gt;(matrixMath matrixA)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7963240914776532463-8391803252914912581?l=pmatrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7963240914776532463/posts/default/8391803252914912581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7963240914776532463/posts/default/8391803252914912581'/><link rel='alternate' type='text/html' href='http://pmatrix.blogspot.com/2007/09/currently-available-functions.html' title='Currently Available Functions'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-7963240914776532463.post-3062936246307777506</id><published>2007-09-04T21:06:00.000-07:00</published><updated>2007-09-18T17:50:11.338-07:00</updated><title type='text'>Future Development</title><content type='html'>&lt;p class="MsoNormal"&gt;The next phase of development for pMatrix should concentrate developing functions for calculating inverse matrices and determinates.&lt;/p&gt;    &lt;p class="MsoNormal"&gt;If you want to contribute code or have other ideas please keep in mind that this is an open source project and your participation in its development is entirely welcome. We have a site set up on sourceforge.net if you are interested in being part of the libraries development.&lt;/p&gt;&lt;p class="MsoNormal"&gt;In the next few weeks we will have matrix operations for translation, shearing and rotation.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7963240914776532463-3062936246307777506?l=pmatrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7963240914776532463/posts/default/3062936246307777506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7963240914776532463/posts/default/3062936246307777506'/><link rel='alternate' type='text/html' href='http://pmatrix.blogspot.com/2007/09/future-development.html' title='Future Development'/><author><name>FA_d:</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='http://2.bp.blogspot.com/-mGoQpnxnDrE/TXZJ1HQ5vrI/AAAAAAAAKhA/XhfB0NQci7A/s220/pic.jpg'/></author></entry></feed>
