The Scale Transform

The ScaleTransform3D makes a figure larger or smaller by multiplying its X, Y, and Z coordinates by properties named ScaleX, ScaleY, and ScaleZ, all of which have default values of 1. Here's how the ScaleTransform3D might appear in markup to transform a GeometryModel3D:

<GeometryModel3D>
    ...
    <GeometryModel3D.Transform>
        <ScaleTransform3D ScaleX="3" ScaleY="1" ScaleZ="2" />
    </GeometryModel3D.Transform>
</GeometryModel3D>

The figure is effectively widened by a factor of 3 and doubled in size along the Z axis. The ScaleY attribute set the value to its default and can be removed. The scale transform formulas are:

x' = ScaleX * x

y' = ScaleY * y

z' = ScaleZ * z

The ScaleTransformExperimenter.xaml program (not shown here because it's quite ...

Get 3D Programming for Windows® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.