MicroWorlds index |
Snowflakes Overview | Go to the snowflakes project! |
so you can use the project |
screenshot of snowflakes (inactive buttons) |
To use this project, you need the free MicroWorlds Web Player, but you do not need to know anything about MicroWorlds. When the random snowflakes are drawn, all of the textboxes are hidden. If you view the snowflakes one at a time, it is fun to try to predict what angles were randomly chosen by the computer in drawing each of the six branches of the snowflake. (There are three angles per snowflake, moving from the outside towards the inside of the flake. The randomly-chosen angles tell the computer how far to turn from the center of each branch.) After you make your predictions, click on "show.variables" to see how close you came. screenshot of the page for watching snowflakes fall (inactive buttons) The slider controls the speed of the snow falling. Each snowflake has been given a different speed in relation to the slider. (See the "snowing" procedure below.)
five snowflakes created with the "lacy snowflakes" page * * * * * * * * * * procedures for SNOWFLAKES Please refer to the screenshots to see the buttons, slider, textboxes, and turtle needed. Remember that on the snowflake-generating page, you need to put the turtle's pen down (pd) so that it will draw. You may want to increase the thickness of the lines (for instance, using the command: setpensize 2). * * * * * * * * * *
to startup
(The next four procedures are used to create one snowflake. The "random.snow" procedure uses hidden textboxes to record the random angles and lengths chosen by the computer for each of the six spokes of the snowflake. The "br" procedure creates two variables -- a for angle and l for length -- and enables the turtle to draw two lines off of a spoke, using the designated angle and length. The "fixed.random.snow" procedure draws one spoke and places three pairs of branches on it using the designated angles and lengths. The "random.snowflake" procedure creates six identical spokes to complete a snowflake.) These four procedures are followed by two procedures for hiding and showing the textboxes, one procedure (new.flake) which puts all of this together and makes sure that the textboxes are hidden, and one procedure for endlessly generating random snowflakes.
to random.snow
to br :a :l
to fixed.random.snow
to random.snowflake
to hide.variables
to show.variables
to new.flake
to lots.of.snowflakes
(The next procedure ensures that the "lots.of.snowflakes" button is turned off while drawing one snowflake at a time.)
to new.snowflake
The next three procedures cancel any process which is currently running on a page before taking you to another page of the project.
to make.snowflakes
to lacy.snowflakes |
© copyright 2000 - Wendy Petti of Math Cats. All Rights Reserved. |