Projective transformation matrix: Difference between revisions

From JSXGraph Wiki
(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...")
 
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 < 13; i++) {
         for (i = 0; i < 3; i++) {
             console.log(M[i].join(' '));
             txt += mat_global[i].join(' ') + '\n';
         }
         }
         console.log("solution", x_global);
         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===

Revision as of 10:12, 22 July 2020



The underlying JavaScript code