To construct the Koch snowflake we start with an equilateral

To construct the Koch snowflake we start with an equilateral triangle with sides of length At each iteration we divide each side into three equal parts, construct an equilateral triangle on the middle part, and delete the middle part. Let K_n be the curve of the snowflake that is generated at step n of the iterations described above. Write a MATLAB program that takes n as an input and generates a graph of K_n.

Solution

Make a function of the snowflake curve as given below

% The value of n represents the iteration nth and the code will plot the graph of Kn

 To construct the Koch snowflake we start with an equilateral triangle with sides of length At each iteration we divide each side into three equal parts, constr

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site