Program that rapresent Koch curve and Koch snowflake.
To download the lastest release you can click here.
$ py Koch_graph.py
After running the program, it will appear a window where you can set the points among which the graph will be plotted and the iteretion count.
You can choose the Koch curve or the Koch snowflake using the drop down menu.
When the graph is plotted, the program will allow to zoom-in
or zoom-out
using the mouse wheel
. The program will allow to modify the iteration count of the
fractal using the arrow-up
and the arrow-down
(using the arrows, the max count possible is 5 due to the slowness of the graphics library when it has so many line).
The program divide into three parts the segment given by the user and place an equilateral triagle insted of the central segment. Than the operation is repeated for all the segments created for the number of time entered by the user.
To represent the snowflake the program creates an equilateral triangle before all the calculations.
When the iteration count is too high the zoom will be jerky due to the slowness of the graphics library when it has so many line.