function [T]=trans_pre(px,py,pz)
%
% [T]=trans_pre(px,py,pz)
% generates translation matrix T

% filename must be "trans_pre.m"
% can also write
% function T=translate(px,py,pz)
% without square brackets

T= [ 1  0   0  px;
     0  1   0  py;
     0  0   1  pz;
     0  0   0  1];
 