What I currently have for code:
function [ T ] = translate( dx,dy )
T = eye(3); % identity matrix
T(1,3) = dx;
T(2,3) = dy;
end
tile1 = [0 2 2 0; % vertex points for the tile in homogeneous coordinates 0 0 1 1; 1 1 1 1]
x = tile1(1,:); % x coordinates for the tile
y = tile1(2,:); % y coordinates for the tile
figure
fill(x, y, ‘cyan’)
grid on
hold on
axis equal tight
axis([-10 10 -10 10])
set(gca, ‘FontSize’, 16)
v1 = [2, 0]
v2 = [1, 1]
dx = v1(1);
dy = v1(2);
next_tile = translate(dx, dy) * tile1
x = next_tile(1,:);
y = next_tile(2,:); % Get the x and y coordinates
fill(x, y, ‘blue’)
d. Now add a third tile in yellow. Translate tilel by v2, and plot it using fill with the color set to ‘yellow’. Just emulate the code in the above part. Rectangular Tessellation 8 6 4 2 -2 -6 -8 -10 10 -5 0 e. Generate the entire tessellation using two nested for loops. To create the entire rectangular tessellation, you will need to add some code inside this nested for loop. % Use nested for loops to tessellate the entire for m-10:10 for n–10:10 % add code here!! pause(0.05) % Animates the tessellation end end
Expert Answer
ANSWER::