function [x_3D,y_3D] = three_D(tilt,t,x,y)
% usage [t_3D,x_3D,y_3D] = three_D(tilt,t,x,y)
%
% Projects (t,x,y) into 3-D perspective coords.
% tilt n = (deg) angle of axis into paper relative to horizontal
% t = position on horizontal axis
% x = position on axis into paper
% y = position on vertical axis
% x_3D = 2-D projection x pos of 3-Dim view of (t,x,y)
% y_3D = 2-D projection y pos of 3-Dim view of (t,x,y)
%
% 2-D projection of (t,x,y) is moved to right by t and the distance x into the
% page is foreshortened by cos^2 of the angle that x-axis makes relative to t axis
% in the 2-D projection.
x_3D = t + x*cos(tilt*pi/180)^2;

% y position maps to y in 2-D except that x moves point parallel to x-axis into page
% by a foreshortened distance . 1/2 * sin(2*theta) = sin(theta)*cos(theta)
y_3D = y + (x/2)*sin(2*tilt*pi/180);

end