Dec 8 2016
However, we have just completed two lessons with Year 7s drawing polygons and (Barefoot Computing’s) crystal flowers. I therefore wanted a scratch version of snowflakes – and also code that did a 6 pointed snowflake too.
The basics of @MissPhilbin’s python example is the following:
- make 3 ‘sticks’ of distance 30 at 45 degree angles
- make 3 twigs going back 30 each time
- repeat branch 7 times at 45 degrees (I will need 5 times and 60 degrees for a 6 sided snowflake).
These are the steps using scratch:
1. Choose Rudolph as your sprite:
You can find him in the fantasy animals section of the sprite library. You need to select him, make him smaller, then move the rotation cross so its still in his middle…
2. Make the twig (I’ve moved Rudolph to the side so you can see the drawing):
3. Make the branch (Come on Rudolph, move over…):
4. Make the Snowflake :
Now you’ve made the branch, you can define it as a function (purple) called Branch, and use it whenever you want:
The example actually shows a snowflake 3 times larger (moving 90).
The pen colour varies with up to 200 hues, so changing the pen colour by 30 each time gives a good spread of colours.
With a small snowflake (30) try making it snow in planned, then random, places on the screen.
These blocks may help you:
and remember the size of the Scratch screen: