You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UAs may not always be able to render three-dimensional transforms and then just support a two-dimensional subset of this specification. In this case <ahref="#three-d-transform-functions">three-dimensional transforms</a> and the properties 'transform-style', 'perspective', 'perspective-origin' and 'backface-visibility' must not be supported. Section <ahref="#3d-transform-rendering">3D Transform Rendering</a> does not apply. Matrix decomposing uses the technique taken from the "unmatrix" method in "Graphics Gems II, edited by Jim Arvo", simplified for the 2D case. Section <ahref="#mathematical-description">Mathematical Description of Transform Functions</a> is still effective but can be reduced by using a 3x3 transformation matrix where <em>a</em> equals m<sub>11</sub>, <em>b</em> equals m<sub>12</sub>, <em>c</em> equals m<sub>21</sub>, <em>d</em> equals m<sub>22</sub>, <em>e</em> equals m<sub>41</sub> and <em>f</em> equals m<sub>42</sub> (see <ahref="#MatrixDefined">A 2D 3x2 matrix with six parameter</a>).
193
193
194
194
<divclass="figure">
195
-
<imgsrc="3x3matrix.png" alt="3x3 matrix" title="\begin{bmatrix} a & c & e \\ b
195
+
<imgsrc="images/3x3matrix.png" alt="3x3 matrix" title="\begin{bmatrix} a & c & e \\ b
196
196
& d & f \\ 0 & 0 & 1 \end{bmatrix}" width="82" height="79">
The coordinate space is a coordinate system with two axes: the X axis increases horizontally to the right; the Y axis increases vertically downwards. Three-dimensional transform functions extend this coordinate space into three dimensions, adding a Z axis perpendicular to the plane of the screen, that increases towards the viewer.
233
233
234
234
<divclass="figure">
235
-
<imgsrc="coordinates.svg" width="270" height="240" alt="Demonstration of the initial coordinate space">
235
+
<imgsrc="images/coordinates.svg" width="270" height="240" alt="Demonstration of the initial coordinate space">
The 'perspective' and 'perspective-origin' properties can be used to add a feeling of depth to a scene by making elements higher on the Z axis (closer to the viewer) appear larger, and those further away to appear smaller. The scaling is proportional to <var>d</var>/(<var>d</var> − <var>Z</var>) where <var>d</var>, the value of 'perspective', is the distance from the drawing plane to the the assumed position of the viewer's eye.
355
355
356
356
<divclass="figure">
357
-
<imgalt="Diagram of scale vs. Z position" src="perspective_distance.png">
357
+
<imgalt="Diagram of scale vs. Z position" src="images/perspective_distance.png">
358
358
<pclass="caption">
359
359
Diagrams showing how scaling depends on the 'perspective' property and Z position. In the top diagram, <var>Z</var> is half of <var>d</var>. In order to make it appear that the original circle (solid outline) appears at <var>Z</var> (dashed circle), the circle is scaled up by a factor of two, resulting in the light blue circle. In the bottom diagram, the circle is scaled down by a factor of one-third to make it appear behind the original position.
Normally the assumed position of the viewer's eye is centered on a drawing. This position can be moved if desired – for example, if a web page contains multiple drawings that should share a common perspective – by setting 'perspective-origin'.
364
364
365
365
<divclass="figure">
366
-
<imgalt="Diagram of different perspective-origin" src="perspective_origin.png">
366
+
<imgalt="Diagram of different perspective-origin" src="images/perspective_origin.png">
367
367
<pclass="caption">
368
368
Diagram showing the effect of moving the perspective origin upward.
0 commit comments