Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

Subject: re: Koch snowflake
From: mwforum@xxxxxxxxxxxxxxxxxx (Wendy Petti)
Date: Mon, 14 Jul 2003 18:34:51 -0500

Kate, to answer your latest question, Bob gave you the MSW Logo code.  In 
MicroWorlds we need to put a space before and after the division sign.  There 
is a simpler MW code for the snowflake, below.

I have added graphics files to accompany the two Koch snowflake projects on 
the attachments page at:


to illustrate levels 3 and 4 using the MW Koch snowflake project (below) and 
the Koch snowflake detail created with the MSW Logo code supplied by Bob G.  
My apologies in advance if message with the MW code and project below end up 
arriving twice; right now one copy is floating in cyberspace.  - Wendy

* * *

Like Bob, I consulted Jim Muller's "The Great Logo Adventure" (thanks, Bob and 
Jim, for the MSWLogo version! The code supplied by Bob is one implementation 
but there are simpler ones) - below is a simple adaptation utilizing the 
MicroWorlds slider feature:

This project uses 2 sliders named LENGTH and LEVEL.  I've slightly renamed the 
variables in the SIDE procedure to show the relationship to the sliders but to 
remind us that these variables begin with the values on the sliders and then 
adjust as the procedure is run:

to koch_snowflake
seth -90
repeat 3 [rt 120 side length level]

to side :length? :level?
if :level? = 0 [fd :length? stop]
side :length? / 3 :level? - 1 lt 60
side :length? / 3 :level? - 1 rt 120
side :length? / 3 :level? - 1 lt 60
side :length? / 3 :level? - 1

See the attached MW project to try it out.


> -----Original Message-----
> From: mwforum-admin@xxxxxxxxxxxxxxxxxx
> [mailto:mwforum-admin@xxxxxxxxxxxxxxxxxx]On Behalf Of Mikula Family
> Sent: Monday, July 14, 2003 3:45 PM
> To: mwforum@xxxxxxxxxxxxxxxxxx
> Subject: [MWForum]Kock Snowflake
> Can you help me program a Kock Snowflake? I THINK it would need
> recursion with a variable.
> It is a triangle with1/3 smaller triangles centered on each side. These
> triangles in turn, each have smaller triangles. On and on.
> I use MicroWorlds 2.05.
> Thanks.

Attachment: koch_snowflake.mw2
Description: koch_snowflake.mw2

  • Previous by thread: Snowflake
  • Next by thread: re: Koch snowflake

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008