Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB CODE ONLY PLEASE! Here's my code so far: tile1 = [0 2 2 0; % vertex points for the tile in homogeneous coordinates 0

image text in transcribedMATLAB CODE ONLY PLEASE!

Here's my code so far:

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 are in row 1 y = tile1(2,:); % y coordinates for the tile are in row 2 figure fill(x, y, 'cyan') grid on hold on axis equal tight axis([-10 10 -10 10]) set(gca, 'FontSize', 16) % These two vectors span the entire plane. v1 = [2, 0] v2 = [1, 1] % Translate the first tile by v1. 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') % plot the next_tile in blue 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 -1050510 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 plane. for m = -10:10 for n = -10:10 $ add code here!! pause (0.05) % Animates the tessellation end end i. First find the translation vector which moves m steps along direction i and n steps along directi V2. The spanning vectors V1 and 72 were already defined above. - V = m Vi + n V2 ii. Define dx and dy as the first and second components of v. iii. Find the coordinates for the next_tile by translating tilel by dx and dy. 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 -1050510 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 plane. for m = -10:10 for n = -10:10 $ add code here!! pause (0.05) % Animates the tessellation end end i. First find the translation vector which moves m steps along direction i and n steps along directi V2. The spanning vectors V1 and 72 were already defined above. - V = m Vi + n V2 ii. Define dx and dy as the first and second components of v. iii. Find the coordinates for the next_tile by translating tilel by dx and dy

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions

Question

How does your firm find new ventures opportunities?

Answered: 1 week ago

Question

What is meant by 'Wealth Maximization ' ?

Answered: 1 week ago