I am looking to create a user interface where the user can click on the screen and create a picture or pattern using Koch's snowflakes. To do this, I was hoping to write the recursive function necessary to generate the Koch's snowflakes, then create graphics objects out of these snowflakes. Is it possible to create graphics objects like this? Any help will be much appreciated! Thanks!

  • 1
    $\begingroup$ Have you seen this, or searched for "Koch" on this site for other such threads? $\endgroup$ Mar 19, 2017 at 0:46
  • $\begingroup$ I got a lot of useful links by entering "mathematica koch snowflake" in google. $\endgroup$
    – m_goldberg
    Mar 19, 2017 at 4:00
  • $\begingroup$ On the user interface side of your question, it would help a lot if you were to give more details on how you want the user to interact with your snowflake drawing code. Mathematica has a function ClickPane that will give a simple user interface where you can draw a Koch snowflake each time the user clicks in the pane. You might start with that. For more complex user interaction, you might want use the Manipulate function. $\endgroup$
    – m_goldberg
    Mar 19, 2017 at 4:07
  • $\begingroup$ What is the question? How to generate Koch snowflake, what parameters should it take? It rather sounds like a question about how to create a new primitive having the object, do you have it then?, if so then you can use 27184. Or maybe you the main question is the interactivity? Could you make a clear question and add what you have/have tried? $\endgroup$
    – Kuba
    Mar 19, 2017 at 16:06

1 Answer 1


With 11.1 release you look into KochCurve. You can define all sorts of related fractal segment replacements. In case of snowflake you can define a function:

    Rotate[kc,2Pi/3,{1/2,-(1/(2 Sqrt[3]))}],
    Rotate[kc,-2Pi/3,{1/2,-(1/(2 Sqrt[3]))}]}

Then you make:

Graphics[KochSnow[#]] & /@ Range[6]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.