%
% Ptotting a parametric surface (The Steiner Roman surface)
%
% Create the u, v grid
%
u = [-1: 0.05: 1];
v = [-1: 0.05: 1];
[U, V] = meshgrid(u,v);


X1 = (U.*V)./(U.^2 + V.^2 + 1);
Y1 = V./(U.^2 + V.^2 + 1);
Z1 = U./(U.^2 + V.^2 + 1);
C1 = [0 1 0]; % green

Stein1 = surf(X1,Y1,Z1);
set(Stein1,'facecolor',C1);

X2 = U./(U.^2 + V.^2 + 1);
Y2 = V./(U.^2 + V.^2 + 1);
Z2 = (U.*V)./(U.^2 + V.^2 + 1);
C2 = [1 0 0]; % red

hold on

Stein2 = surf(X2,Y2,Z2);
set(Stein2,'facecolor',C2)

X3 = U./(U.^2 + V.^2 + 1);
Y3 = (U.*V)./(U.^2 + V.^2 + 1);
Z3 = V./(U.^2 + V.^2 + 1);
C3 = [0 0 1]; % blue

Stein3 = surf(X3,Y3,Z3);
set(Stein3,'facecolor',C3)
hold off


