Function to make a Rotate-and-Scale Matrix:
Function to replace a line segment with a new set of scaled line segments:
Function to do a single iteration of the Koch construction:
Function to do 'n' interations of the Koch construction
Original polygonal shape:
L1= {{1,1},{1,-1}, {-1,-1},{-1,1},{1,1}};
![[Graphics:kochgr11.gif]](kochgr11.gif)
Unscaled replacement line segments (starts at 0,0 and ends at 1,0):
L0 = {{1/3,0},{2/3,1/3},{1,1/3}, {2/3,0}};
Do the Koch construction ' n' times:
![[Graphics:kochgr19.gif]](kochgr19.gif)