The Koch snowflake is a fractal that is created by starting with a line segment, then recursively altering it as follows:
1. Divide the line segment into three segments of equal length.
2. Draw an equilateral triangle that has the middle segment from step 1 as its base.
3. Remove the line segment that is the base of the triangle from step 2.
Figure 12.11 shows the first several iterations of the snowflake.
Write a program to draw the Koch snowflake on a DrawingPanel recursively.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.