MatrixInvert.frink

Download or view MatrixInvert.frink in plain text format


/** This is an attempt to symbolically invert a 4x4 3-D transformation
    matrix. */
 

use Matrix.frink

symbolicMode[true]
showUndefinedValues[false]

a = new Matrix[[[m11, m12, m13, m14], [m21, m22, m23, m24], [m31, m32, m33, m34], [0, 0, 0, 1]]]

println[a.det[]]

adj = a.adjugate[]
println["Adjugate matrix:"]
println[formatMatrix[adj.array]]

inv = adj.multiplyByScalar[1/a.det[]]
println["Inverse matrix:"]
println[formatMatrix[inv.array]]


Download or view MatrixInvert.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 19355 days, 11 hours, 37 minutes ago.