The Koch snowflake (also known as the Koch star and Koch island) is a mathematical curve and one of the earliest fractal curves to have been described. It is based on the Koch curve, which appeared in a 1904 paper titled "On a continuous curve without tangents, constructible from elementary geometry" (original French title: Sur une courbe continue sans tangente, obtenue par une construction géométrique élémentaire) by the Swedish mathematician Helge von Koch.
The Koch snowflake can be constructed by starting with an equilateral triangle, then recursively altering each line segment 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 and points outward.
3. remove the line segment that is the base of the triangle from step 2.
After one iteration of this process, the resulting shape is the outline of a hexagram. The Koch snowflake is the limit approached as the above steps are followed over and over again. The Koch curve originally described by Koch is constructed with only one of the three sides of the original triangle. In other words, three Koch curves make a Koch snowflake.
This is the view of the sixth iteration:
In my program you can view each iteration with arrow controls. Also, by clicking at any point in the window, my program will calculate distance till the closest point in Koch Curve. Available only at fifth iteration.
You can download source, working with Windows and MacOS X prior to 10.9, here: LINK