<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <META NAME="resource-type" CONTENT="document"> <META NAME="author" CONTENT="EMILE Bruno"> <META NAME="description" CONTENT="Le mot-cle matrix de l'aide POV-Ray 3.00"> <META NAME="distribution" CONTENT="Global"> <TITLE>Le mot-cl&eacute; matrix</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- if(parent.frames.length < 1) { 	document.location.href = '../reprise_povray300.html?lien=MOT-CLE_MATRIX.htm' } //--> </SCRIPT> </HEAD> <BODY BACKGROUND="../images/bg10.jpg"> <!-- eStat --> <SCRIPT LANGUAGE="JavaScript"> <!-- var _UJS=0; //--> </SCRIPT> <SCRIPT LANGUAGE="JavaScript" SRC="http://perso.estat.com/js/m.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript"> <!-- if(_UJS) _estat('222022147102','MOT-CLE_MATRIX_POV-Ray_300','POV-Ray_300'); //--> </SCRIPT> <!-- /eStat --> <P><FONT FACE="Arial" SIZE=5 COLOR="#008000"><B> 7.3.1.4 Le mot-cl&eacute; matrix</B></FONT></P> <P ALIGN="JUSTIFY">Le mot-cl&eacute; <FONT FACE="Arial" COLOR="#ff0000">matrix</FONT> peut &ecirc;tre utilis&eacute; pour sp&eacute;cifier explicitement la matrice de transformation &agrave; utiliser pour les objets ou les textures. Sa syntaxe est :<BR><BR> <FONT FACE="Arial" COLOR="#0000ff">matrix &lt; m00, m01, m02,<DIR> m10, m11, m12,<BR> m20, m21, m22,<BR> m30, m31, m32 &gt;</DIR></FONT> O&ugrave; <FONT FACE="Arial" COLOR="#ff0000">m00</FONT> &agrave; <FONT FACE="Arial" COLOR="#ff0000">m32</FONT> sont des expressions num&eacute;riques qui sp&eacute;cifient les &eacute;l&eacute;ments d'une matrice de 4*4, avec les quatre colonnes remplies implicitement par <FONT FACE="Arial" COLOR="#ff0000">&lt;0,0,0,1&gt;</FONT>. Un point <FONT FACE="Arial" COLOR="#ff0000">P</FONT>, <FONT FACE="Arial" COLOR="#ff0000">P=&lt;px, py, pz&gt;</FONT>, est transform&eacute; en <FONT FACE="Arial" COLOR="#ff0000">Q</FONT>, <FONT FACE="Arial" COLOR="#ff0000">Q=&lt;qx, qy, qz&gt;</FONT> par :<BR><BR> <FONT FACE="Arial" COLOR="#0000ff">qx = M00 * px + M10 * py + M20 * pz + M30<BR> qy = M01 * px + M11 * py + M21 * pz + M31<BR> qz = M02 * px + M12 * py + M22 * pz + M32</FONT><BR><BR> <P ALIGN="JUSTIFY">Normalement, vous ne voudrez pas utiliser le mot-cl&eacute; <FONT FACE="Arial" COLOR="#ff0000">matrix</FONT>, car c'est moins descriptif que les commandes de transformation, et plus difficile &agrave; visualiser. Il y a, cependant, un aspect int&eacute;ressant dans la commande <FONT FACE="Arial" COLOR="#ff0000">matrix</FONT>. Elle autorise plus de transformation, comme le d&eacute;coupage. La matrice suivante d&eacute;coupe un objet le long de l'axe y.<BR><BR> <FONT FACE="Arial" COLOR="#0000ff">object {<DIR> MyObject<BR> matrix &lt; 1, 1, 0,<DIR> 0, 1, 0,<BR> 0, 0, 1,<BR> 0, 0, 0 &gt;</DIR> }</DIR> <TABLE CELLPADDING="5" BORDERCOLORLIGHT="#C0C0C0" BORDERCOLORDARK="#C0C0C0" WIDTH="100%"> <TR ALIGN="CENTER"> 	<TD ALIGN="LEFT"><A HREF="ROTATION.htm"><IMG SRC="../images/o_mar_gauche_30p.png" WIDTH="28" HEIGHT="27" BORDER="0" ALT="La rotation"></A></TD> 	<TD ALIGN="RIGHT"><A HREF="ORDRE_TRANSFORMATIONS.htm"><IMG SRC="../images/o_mar_droit_30p.png" WIDTH="28" HEIGHT="27" BORDER="0" ALT="L'ordre des transformations"></A></TD> </TR> </TABLE> </BODY> </HTML> 
