rotate_shrink_square - hold on % Set the axis. axis([-2 2...

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

View Full Document Right Arrow Icon
% rotate_and_shrink_square.m For problem 11d % Create matrix whose columns contain the coordinates of each vertex. U = [1 0 -1 0; 0 1 0 -1]; theta = pi/8; % Create a red unit square. Note U(1,:) denotes the first row of U. fill(U(1,:),U(2,:),'r')
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: hold on % Set the axis. axis([-2 2 -2 2]); % Perform rotations and shrinkings. R = [cos(theta) -sin(theta); sin(theta) cos(theta)]; Rhat = .9*R; for iter=1:50, U = Rhat*U; fill(U(1,:),U(2,:),'r'); end; axis equal tight, grid on...
View Full Document

This note was uploaded on 12/08/2009 for the course AMATH 10211 taught by Professor Annegreenbaum during the Spring '09 term at University of Washington.

Ask a homework question - tutors are online