Calculation of 4x4 matrix of planes

Thank you for your reply.

I could understand ‘axis’, ‘taxis’ and ‘saxis’ by example.
It has been improved as follows.

int maxi = 0;
double maxv = 0.0;
for (int i = 0; i < 3; i++)
{
  double tmp = normal[i]*normal[i];
  if (tmp > maxv)
  {
    maxi = i;
    maxv = tmp;
  }
}
// Create the corresponding axis
double axis[3];
axis[0] = 0.0;
axis[1] = 0.0;
axis[2] = 0.0;
axis[maxi] = ((normal[maxi] < 0.0) ? -1.0 : 1.0);
double saxis[3], taxis[3];
taxis[0] = 0.0;
taxis[1] = 1.0;
taxis[2] = 0.0;
if (maxi == 1)
{
  taxis[1] = 0.0;
  taxis[2] = 1.0;
}
vtkMath::Cross(taxis, axis, saxis);

Is the fourth row of the 4x4 matrix correct?

resliceMatrix->Element[0][3] = Origin[0];
resliceMatrix->Element[1][3] = Origin[1];
resliceMatrix->Element[2][3] = Origin[2];
resliceMatrix->Element[3][3] = 1.0;