torus - Y=(2 cos(phi*sin(theta Z=sin(phi*ones(size(theta...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function torus(A) [ma,na]=size(A); theta=0:2*pi/ma:2*pi; phi=[0:2*pi/na:2*pi]'; X=(2+cos(phi))*cos(theta);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Y=(2+cos(phi))*sin(theta); Z=sin(phi)*ones(size(theta)); surf(X,Y,Z,A'); axis square;axis equal...
View Full Document

This note was uploaded on 04/19/2011 for the course MATH 21126 taught by Professor Johnson during the Spring '11 term at Carnegie Mellon.

Ask a homework question - tutors are online