% MCS 320 Project 3 Solution % this script produces the file "output" with the % listing of five m-files; and draws four figures. diary output % ASSIGNMENT ONE type wireplot.m v = [0 0 0; 2 0 0; 1 2 0; 1 1 1]; e = [1 2; 2 3; 3 1; 1 4; 2 4; 3 4]; figure wireplot(v,e) % shows a tetrahedron % ASSIGNMENT TWO type translate.m type transform.m t = [3 2 0]; % displacement vector tv = translate(v,t); % translate polyhedron s = diag([0.5 0.8 1.2]); % scaling matrix sv = transform(tv,s); % scale the polyhedron figure wireplot(v,e); % original polyhedron wireplot(sv,e); % ASSIGNMENT THREE type barycenter.m type scale.m figure v8 = scale(v,0.8); v4 = scale(v,0.4); v2 = scale(v,0.2); wireplot(v,e); wireplot(v8,e); wireplot(v4,e); wireplot(v2,e); % ASSIGNMENT FOUR type stair.m figure stair diary off