Projective transformation matrix: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) (Created page with "<jsxgraph width="600" height="600"> var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-10, 10, 10, -10]}); // Compute a projective transformation which maps...") |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 45: | Line 45: | ||
for (i = 0; i < 3; i++) { | for (i = 0; i < 3; i++) { | ||
for (j = 0; j < 3; j++) { | for (j = 0; j < 3; j++) { | ||
mat_global[i][j] = x_global[i * 3 + j]; | mat_global[i][j] = x_global[i * 3 + j].toFixed(3); | ||
} | } | ||
} | } | ||
var txt = ''; | |||
for (i = 0; i < | for (i = 0; i < 3; i++) { | ||
txt += mat_global[i].join(' ') + '\n'; | |||
} | } | ||
document.getElementById('jxg_output').value = txt; | |||
}; | }; | ||
Line 75: | Line 75: | ||
} | } | ||
</jsxgraph> | </jsxgraph> | ||
<html> | |||
<pre id="jxg_output" cols="50" rows="20"></pre> | |||
</html> | |||
===The underlying JavaScript code=== | ===The underlying JavaScript code=== |