Question: Fractals are recursive shapes that are used extensively in both 2D and 3D graphics in the movie, gaming and VR industries. In order to
Fractals are recursive shapes that are used extensively in both 2D and 3D graphics in the movie, gaming and VR industries. In order to understand how recursion is used in constructing fractals, let us consider a simple fractal called Koch snowflake (shown below) which was proposed by Von Koch in 1904, decades before Mandelbrot presented a formal theory on fractals. The Koch snowflake can be constructed by starting with an equilateral triangle as its base shape, and then recursively altering each line segment as follows: divide the line segment into three segments of equal length. draw an equilateral triangle that has the middle segment (green color) from step 1 as its base and points outward. remove the line segment that is the base of the triangle from step 2. At the nth iteration, the resulting curve is called the Koch snowflake of order n. In this problem, we will study the construction of Koch snowflake and its recursive properties. 1. Write the recurrence relation for the perimeter and area of nth order Koch snowflake. 2. Write the pseudocode for the above algorithm. 3. Compute the running time of your algorithm. 4. Write a program in Python to draw Koch snowflake of order n using the graphics package Turtle. For details about this package, please visit the following webpage: https://docs.python.org/3/library/turtle.html
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
