Problem 60576. Perimeter of a Koch snowflake
A Koch snowflake is an iteratively generated (fractal) shape built out of successively smaller equilateral triangles by following these steps:
- Draw an equilateral triangle. (n = 0)
- Divide the line segment into three segments of equal length.
- Draw an equilateral triangle that has the middle segment from step 2 as its base and points outward.
- remove the line segment that is the base of the triangle from step 3. (n = 1)
- Repeat steps 2 - 4. (n = 2,3,...)
In the limit of
this shape has an infinite perimeter and a finite area. For
, this perimeter is calculable. Calculate both of these values for any input value of n and any starting triangle edge length, s.
[A1,P1] = KochSnowflake(n,s)
Solution Stats
Problem Comments
-
1 Comment
Christian Schröder
on 12 Jul 2024
Nice problem!
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
4178 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2524 Solvers
-
106 Solvers
-
337 Solvers
-
Create an array (n,n) where only diagonal elements are '1' and others are '0'
85 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!