Calculating eigenvalues

Started by
11 comments, last by sQuid 18 years, 1 month ago
Quote:Original post by DavidB
(I am curious: what do game developers do with eigenvalues?)


From what I understand, both eigenvalues and eigenvectors are very useful and arise quite often wherever things can be expressed by matrices.

E.g. given a 3x3 rotation matrix, its only real eigenvector is the axis, normal to the plane where the rotation takes place.

Or, given the inertia tensor of a solid, its eigenvectors are the principal axes (axes around which angular velocity is collinear to the angular momentum) and the eigenvalues are the moments around those axes. These are useful in dynamics simulations...

I also hear that they are used in solving/modelling resonance problems of vibrating systems. A good motorbike simulation wouldn't be *that good* without them...
Advertisement
Quote:Original post by Repetit

DavidB, Im very interested in your source code.



Hello, Rene

If you know some &#106avascript, you may be able to translate the utilities already posted on my website. For example, here is a &#106avascript routine for calculating the eigenvalues AND eigenvectors of a 6x6, Real, GENERAL matrix. It is a translation of the EISPACK routine RG.F.<br><br>http://www.akiti.ca/Eig6Solv.html<br><br>The size of the matrix (6) has been hard-coded in this particular routine; however, the algorithm itself is easy to change. You would just have to code a section for the input and output.<br><br>For a Real, SYMMETRIC, matrix, I recently finished a modified translation of the EISPACK routine RS.F. The &#106avascript version is here (for a 3x3 matrix):<br><br>http://www3.telus.net/thothworks/Eig3RSSolv.html<br><br>This translation calculates eigenvalues &#111;nly, no eigenvectors.<br><br>The intro to my C++ source code is here:<br><br>http://www3.telus.net/thothworks/EigRSvalosrc.html<br><br>Hopefully, your C++ coding skills are better than mine; the algorithm itself is fine, but my dynamic memory management is not the best. You will note that I use an awkward old technique supported by Visual C++ version 6, but which is not proper coding practice. I hope to improve the memory management section in the next two versions, that is why I have created spots for version 1 and 2, to be done later.<br><br>Hope this helps.<br><br><br>David<br>
Quote:Thanks for all the answers! Im not really a game developer, I am studying physics at university at I need to compute eigenvalues in very large matrices (100x100) for some applications in quantum mechanics.


You might find this useful:

http://www.physics.uq.edu.au/people/dawson/matrix/doc/

This topic is closed to new replies.

Advertisement