Hi,

I am a bit confused regarding what your actual question is, since your code does not contain any matrix operations. I assume you want to know how matrix transforms work, so that you can construct one? You can check the ScratchPixel section on matrices, they have a pretty good explanation on how you can define transforms with matrices (if you don't already know what vectors are you should probably read that chapter too, especially regarding the geometric meaning of the cross product). Note that practically every software has a slightly different interpretation of transformation matrices, so read ScratchPixel more as a general guide.

`c4d.utils`

defines three functions to construct a rotation matrix axis by axis, the example also modifies the offset component of the final rotation matrix so that it also translates points by 100 units along the y axis.

```
90_DEGREE = math.pi * .5
# construct a rotation matrix for each axis.
mg_x = c4d.utils.MatrixRotX(90_DEGREE)
mg_y = c4d.utils.MatrixRotY(0)
mg_z = c4d.utils.MatrixRotZ(-90_DEGREE)
# multiplying matrices will give you a matrix which combines all transformations
my_final_transform = mg_x * mg_y * mg_z
# set the offset
my_final_transform.off = c4d.Vector(0, 100, 0)
# transform a point in global space
some_point_in_global_space = c4d.Vector(100, 0, 0)
transformed_point = my_final_transform * some_point_in_global_space
```

You can also construct matrices manually if you have one or multiple normals (or vectors if you also want to scale stuff), using the cross product:

```
# note that the x and y components are switched, so we rotate by 90 degree on
# the axis orthogonal to the xy-plane (the z axis).
x_component = c4d.Vector(0, 1, 0)
# the y component is not an unit vector so we scale by 2 on that axis
y_component = c4d.Vector(2, 0, 0)
# define the z axis manually
z_component = c4d.Vector(0, 0, 1)
# or construct it using the x and y component
z_component = x_component.Cross(y_component).GetNormaliezd()
# the offset (the translation component) for the matrix
off_component = c4d.Vector(100, 0, 0)
# build the matrix
my_transform = c4d.Matrix(off_component, x_component, y_component, z_component)
#do stuff with it
transformed = []
for p in points:
transformed.append(my_transform * p)
```

Cheers

zipit