jesse's geometry through micro worlds

9
Geometry Through MicroWorlds By Jesse McDougall

Upload: yr05

Post on 15-Aug-2015

130 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Jesse's geometry through micro worlds

Geometry Through MicroWorlds

By Jesse McDougall

Page 2: Jesse's geometry through micro worlds

Contents

Shooting Star 2………………………………………………………………………………………………….3

Disco Bowling Ball .…………………………………………………………………………………………..4

Sharp-Cog ………………………………………………………………………………………………………….5

Disco Slinky ……………………………………………………………………………………………………….6

Flag Wave …….……………………………………………………………………………………………………7

Windmill Blowtoy ………………………………………………………………………………………………8

Page 3: Jesse's geometry through micro worlds

Shooting Star 2

The program works by first clearing the graphics. Then, the turtle named ‘music’ plays music that I created as the second turtle draws. The second turtle sets the background to black, sets it’s heading to 355° and then moves with the pen up to specified coordinates on a Cartesian plane. A variable called ‘count’ is set to 410. Then the turtle does ‘count’ times of the next section of the program. The next section sets the colour to :i plus 1. Since it says dotimes, :i starts as zero and increments by one every time. The next section of the program repeats five times. It goes forward :i pixels and right turns 144°. Then it waits 0.01 turtle seconds, right turns one tenth and goes forward two tenths and repeats, the object increasing in size, curving and changing the colour. If you remove the internal lines the star or decagon has two sets of five equal angles: five acute (36°) and five obtuse (252°). Even though the shape increases in size, the angles never change. If you don’t remove the lines there are five 108° angles, five 36° angles and ten 72° angles. The end result of this shape is not a polygon as three of the sides are curved. I figured out how to do this while learning about variables and changing colour with my Dad.

Page 4: Jesse's geometry through micro worlds

Disco Bowling BallThis program works with lots of other programs so I’ll explain them all.

The first program is ‘turn’. In the command box, you decide what the radius is and how much of the circumference you want to turn and in which direction. Then, ‘turn’ sets a variable of the circumference as 2 times the radius times pi. It then repeats the absolute value of how much of the circumference you entered in the commands box. (The absolute value of negative three would be three). It goes forward the circumference divided by three hundred and sixty. Then there is an ifelse statement that says if degrees is less than zero, left turn one degree or else right turn one degree. The second program is a bowling ball. It says to ‘turn’ that the radius of the circle is 300 divided by pi and that the percentage of the circumference is 360 (a full circle). Then it sets the turtle’s heading to the right and tells it to lift the pen up, go forward fifty and put the pen down. It then repeats the following 360 times: right turn one, forward a tenth, creating the first finger hole. After this it puts the pen up and moves the turtle forward twenty and then puts the pen down again. Next, it repeats the following 360 times to create the second finger hole: right turn one degree, forward one tenth. The program sets the turtle’s heading to 315 degrees, puts the pen up, goes forward 18.2, puts the pd and repeats the following 360 times to create the last finger hole: right turn one degree, forward a tenth. Then it puts the pen up, sets the turtle’s heading right and goes forward 20. It waits five turtle seconds and then fills the ball. ‘Discobowl’ works by doing bowling ball and repeats the following twelve and a half times. The programs optional 1,2,3,4,5,6 and 7 all set the colour to a different colour, sets the turtle’s heading and puts the pen up, and it goes forward ten. Then it fills the space with the set colour, creating a disco effect. Geometrically, a perfect circle has no angles and only one side so a turn of 360 degrees would have infinite angles. I figured out how to do this by making optional effects and a bowling ball for a challenge and then combining the two.

Page 5: Jesse's geometry through micro worlds

Sharp CogThe program commences with ‘turn’. Then it does ‘petal’. When you type petal in the commands box you type a number with it for the size of the petal to be stored in a variable. The program tells the turtle to repeat the following two times: forward the petal’s size, ‘turn’ the petal’s size multiplied by two with a ninety degree ‘turn’. Then, it goes forward the petal’s size times two, ‘turn’s the petal’s size times two and negative ninety finishing with a one hundred and eighty degree turn. ‘Pinwheel’ is the third program. ‘Pinwheel’ begins by hiding the turtle and clearing the graphics. After this it repeats the following how ever many petals you ask for: make a size twenty petal, right turn 360 divided by how many petals so there will always be the perfect amount of petals on each shape. A sharp cog is a ‘pinwheel’ with ninety petals, looking like a sharp cog, hence the name. This is not a polygon as it has curvy sides. Although this shape has curvy lines, it still has angles. Despite a 1080 pinwheel’s look, it still isn’t a circle as three hundred and sixty divided by one thousand and eighty is not as accurate as pi. I learnt how to do this by watching a YouTube clip with something very similar and altering the program slightly. A Sharp Cog

A 1080 Petal Pinwheel

Page 6: Jesse's geometry through micro worlds

Disco Slinky

The program begins by clearing the graphics. Then it say do the following 360 while making :i zero and every time it goes through the loop it adds one to :i. It sets the colour to :i hence the different colours. After this it sets the turtles heading to :i and ‘turn’s 100 and -360.A circle is not a polygon as it has curved sides. The shape when finished looks like one large circle but there are spaces in between the circles so it isn’t round. I figured this out really easily after doing many similar programs and just applying my knowledge.

An Incomplete Disco Slinky

Page 7: Jesse's geometry through micro worlds

Flag WaveThis program begins by clearing the graphics, hiding the turtle and putting the pen down. It the sets three variables: “a becomes one, “size becomes one and count becomes 99950. Then the program repeats the following :count times: Set the turtle’s position on the Cartesian plane to the origin, move the turtle forward :size and set the turtle’s heading to :a. It then sets the colour to :a and repeats the following four times: forward :size, right turn ninety degrees. Finally, it makes “a :a + 1 and “size :size + 0.05, making the shape increase in size and change colour. The shape to the right has two sides; one curved and one straight. One of these flags is a line with a square on top but it still isn’t a polygon as the flag isn’t enclosed (a line sticks out). I figured out how to do this by making disco square which is exactly the same except it doesn’t stick out like a flag. I just added forward :size (circled) and made something new.

Page 8: Jesse's geometry through micro worlds

Windmill BlowtoyThe first program is ‘test_vars’. It first sets two variables: “a and “b. In this case it sets both to one hundred and forty. Then, it makes “c the square root of the sum of :a squared and :b squared (pythagoras theorem). It then makes the turtle move backwards :a, right turn ninety and forward :b. Next, left turn the arc tangent of :a divided by :b. Finally, the turtle moves forward :c (the hypotenuse). The second program is ‘windmill blowtoy’. This program begins by clearing the graphics, hiding the turtle, putting the pen down and repeating ‘test_vars’ eight times. It makes this shape because at the end of the program I don’t tell the turtle to turn back to it’s original heading. Next, the program sets two variables: “angle and “colour. Then it set the colour to eight, put the pen up and repeats the following 151 times: Set the turtles position to the origin. Then, it makes “colour :colour + ten, hence the changing colour. It sets the turtles heading to angle, moves the turtle forward twenty. It sets the colour to the variable :colour and fills the space that the turtle is in. Then it makes “angle :angle + 45 so it goes forward into the next triangle the next time around. I figured out how to do this by learning about variables with my dad and because my excellent teacher Mrs. Watson set me the challenge of making ‘one of those blow toys you buy at a fair’. This shape is my only polygon in this power point and it is a “hexadecagon”.

Page 9: Jesse's geometry through micro worlds