%% Parameterized Surface Plot
% Plot the parameterized surface
% \matrix{x = r\cos(s)\sin(t) \cr y = r\sin(s)\sin(t) \cr z = r\cos(t)
% \cr {\rm where\quad} r = 2+\sin(7s+5t)}
% for 0<s<2\pi and 0<t<\pi.
% Improve the plot's appearance by using camlight.

syms s t
r = 2 + sin(7*s + 5*t);
x = r*cos(s)*sin(t);
y = r*sin(s)*sin(t);
z = r*cos(t);
fsurf(x, y, z, [0 2*pi 0 pi])
camlight
view(46,52)

% Copyright 2012 The MathWorks, Inc.