Draw a Pumpkin using Matlab
The halloween is approaching. Mathworks presents the following Matlab code to draw a Pumpkin. % Pumpkin =sphere(200); R=1-(1-mod(0:.1:20,2)).^2/12; x=R.*X; y=R.*Y; z=Z.*R; c=hypot(hypot(x,y),z)+randn(201)*.03; surf(x,y,(.8+(0-(1:-.01:-1)'.^4)*.3).*z,c, 'FaceColor', 'interp', 'EdgeColor', 'none') % Stem …