Wednesday, September 5, 2007

HW for Thursday class due Sunday at 2:00

1. Guess what this program will do and explain why:
local x
x=3
repeat 5 [wrnum x x=x+4]

2. Guess what this program will do and explain why:
local x
x=1
repeat 5 [wrnum x x=x*2]

3. The program:

local x
x=20
repeat 40 [fd x rt 89 x=x+4]

creates an interesting picture. Can you explain why is this so and what is the role of the number 89 in the picture? What is the point of that 89???? Do you like this picture? try changing the number 89 to other numbers. Can you find a rule? This problem is both mathematical and artistic.


4. A. Explain why the last line of the picture is of length (20+39*4)
B. Explain why the program:

local x
x=20
repeat 40 [fd x rt 89 x=x+4]
lt 89 color red [bk 20+ 39*4]
jt 1000 0
actually proves it

5. There are three pictures in:
http://www.ithaca.edu/dani/classes/Mart/picture_puzzles/sequences.PNG
All three pictures are based on the same sequence:
20,30,40,50....
What are the three programs that make them and why. (Create them yourself)

19 comments:

Megan said...

1. Five numbers that increase by 4 everytime, starting with 3.

2. Five numbers that multiply by 2 everytime, starting with 1.

3. 89 is the number of degrees that the lines are rotated. I do like the picture. I think it's very interesting. The rules is that the length of the line increases by 4 each time, starting at 20 and it does this 40 times l rotating on an 89 degree angle each time.

4a. The last line is length (20+39*4) because we asked the program to start at length 20 and repeat this 40 times, and increasing the length by 4 each time.

4b. This proves it because we wanted a certain part of the object to be red and we put in the length we suspected the line was and the only red part of the object is the last line.

5.
OBJECT 1
GROWBY 50% 10 [circle 20]

OBJECT 2
GROWBY 50% 10 [box 20 20]

OBJECT 3
local x
x=10
repeat 10 [fd x rt 90 x=x+10]

Megan Duhancik
mduhanc1@ithaca.edu

Anonymous said...

1.starting at the number 3 and increases by 4, 5 times.
2. starting at 1, repeating 5 times, will multiply by 2 every time.
3. the lines rotate 89 degrees every time, the line extnds by 4 each time, starting at 20, this happens 40 times.
4a The program has its last post at 20+39*4 because the program stared at 20 and after 39 times it increases its length by 4.
4b the line (20+39*4) iis colored red because its the program tht tell it to so it proves it.
5. I had trouble with number 5
~~Jason Zweig

Chrissie Delvalle said...

1. LOCAL X will make a box inside the computer. x=3 will put the number three right outside the box. Then the computer will write the number x, which is three and increase it by 4. This will be repeated 5 times.

2. LOCAL X will make a box inside the computer. X=1 will put the number 1 outside the box. Then the computer will write the number 1 and multipy it by the 2nd power and repeat this 5 times.

3. LOCAL X will make a box inside the computer and because X is 20 it will write 20 right outside the box. FD X will draw a line in the current direction. The lenght of the line will be 20. Then the turtle will turn 89 degrees and draw a line 20+4= 24 in length. It will do this 40 times each time increasing the lenght of the line by 4. I think that because the turtle only turns a degree of 89 instead of a full 90 this picture will be a spiral that will be of center. I can picture it in my head better then i can explain it.

4. A. The last line will be 20+39*4 because if you add 4 to 20, 39 times you will get the same anwser as 20+39*4. I'm not very good at explain that one either.

B. This will make just the last line red I think....because it says 89 color red but only 20+39*4, which is the equation for the last line.

5. ok umm when i put the web address in the bar it said it could not bring that page up???? ahhh i dont know what to do...

Anonymous said...

1.) Starting with the number three, 5 numbers listed that increase by 4 each time. Example: 3,7,11,15,19

2.) Starting with the number one, 5 numbers will appear that have been multiplied by 2 each time. Example: 1, 2, 4, 8, 16.

3.)the number 89 represents the number of degrees the drawing is rotating. fd is a method of drawing a line, moving the turtle forward any length. starting with a length of 20, the lengths of the lines will increase by 4 each time (20,24,28, 32...etc...) and rotate 89 degrees each time as well.

4.) (a) the program repeats 40 times and therfore increases the line by 4 40 times which, when made simpler, looks like (20 +39*4)
(b) It is proven because the length of the last line is colored red to prove that the line is much longer and the individual lines are gradually increasing in size.


Aimee Lillienstein
alillie1@ithaca.edu

V said...

1. wrnum will write 5 numbers starting with 3, increasing by 4 each time.

2. wrnum will write 5 numbers starting with 1 which will double each time.

4. a. The line increases by four forty times beginning at zero, so the last time that it increases, it is going to be by a factor of 39.

4. b. This program proves the length of the last line by specifying that it be red.

5. local x
x=10
repeat 10 [circle x x=x+10]

local x
x=10
repeat 10 [box x x x=x+10]

local x
x=10
repeat 10 [fd x rt 90 x=x+10]

Vincent Allport.
vallpor1@ithaca.ed

Anonymous said...

#1 This program will create 5 numbers. They will go up by four everytime starting with the number 3.

#2 This will create five numbers that are doubled everytime starting with 1.

#3 This becomes almost a box spiral, but because the degrees are 89 instead of 90 the lines on the right turns get closer than they would with the 90 degree angle. It is an interesting picture.

#4 a. The program stops at (20+39*4) because it starts with 20 then repeats 39 times increasing by 4
b. That proves it because we made that line red when we put that it and that shows its the last line

#5 The first picture is cirlces inside of circles. One way to do this is to type CIRCLE 20, CIRCLE 30, CIRCLE 40, CIRCLE 50... or you can just type GROWBY 50% 10[CIRCLE 20]

The second picture is boxes inside of boxes. This picture can be done similarly to the first picture by typing BOX 20 20, BOX 30 30, etc. or by again doing GROWBY 50% 10[BOX 20 20]

The third picture is the box spiral that we did in class and can be created by typing LOCAL X, X=10, REPEAT 10[FD X RT 90 X=X+10]

Anonymous said...

1. It will write the number 3, then 4 more numbers will be written and they will be increased by 4 each time.

2.it will write the number 1 first, then 4 more numbers that will multiply by 2 everytime.


3.89 means that it rotates right 89degrees. The lenght increases by 20 fist, then plus 4 everytime. It repeats this 40 times. I think the picture is cool and i like its design.

4a. The lenght started at 20, and we added 4 to it each time. and that was repeated 40 times.

4b. It colors the part we thought was the last line red, so this proves to us that the line we thought was last, actually is.


5a. CIRCLE 150, CIRCLE 125, CIRCLE 110, etc...

5b. You could do BOX 200 200, then BOX 150 150, BOX 125 125 etc... It's just a bunch of little boxes inside a big one.

5c. local x
x=5
repeat 10 [fd x rt 90 x=x+5]

Anonymous said...

1. The program will show a sequence of 5 numbers increasing by 4 starting at 3 given the operative commands are repeat and wrnum.
2. The program will, starting at 1 since the first x=1, show a repeating sequence of 5 numbers, due to repeat and wrnum, that increase by multiplying by 2.
3. The 89 results in an 89 degree repeating right turn causing the image to appear to be rotating counterclockwise. The image is indeed interesting as it resembles a vortex of sorts. Angles >90 degrees result in a clockwise rotation. Angles <90 degrees cause a counterclockwise rotation.
4. A. That is the line's length as it is the x at 1 which is 20 plus the 39 4's from the action being repeated.
B. That proves it because it creates the original program and then reverses the program used to create the line and traces back over it in red.
5. A. Program: local x x=10 repeat 10[circle x x=x+10] Reason: It's simply repeating expanding circles.
B. Program: local x x=10 repeat 10[box x x x=x+10] Reason: It's repeating expanding boxes.
C. Program: local x x=10 repeat 10[fd x x=x+10 rt 90] Reason: It's similar to the pattern in question 3 with a repeating right turn but with lines increasing in length.

Anonymous said...

1. The program will show a sequence of 5 numbers increasing by 4 starting at 3 given the operative commands are repeat and wrnum.
2. The program will, starting at 1 since the first x=1, show a repeating sequence of 5 numbers, due to repeat and wrnum, that increase by multiplying by 2.
3. The 89 results in an 89 degree repeating right turn causing the image to appear to be rotating counterclockwise. The image is indeed interesting as it resembles a vortex of sorts. Angles >90 degrees result in a clockwise rotation. Angles <90 degrees cause a counterclockwise rotation.
4. A. That is the line's length as it is the x at 1 which is 20 plus the 39 4's from the action being repeated.
B. That proves it because it creates the original program and then reverses the program used to create the line and traces back over it in red.
5. A. Program: local x x=10 repeat 10[circle x x=x+10] Reason: It's simply repeating expanding circles.
B. Program: local x x=10 repeat 10[box x x x=x+10] Reason: It's repeating expanding boxes.
C. Program: local x x=10 repeat 10[fd x x=x+10 rt 90] Reason: It's similar to the pattern in question 3 with a repeating right turn but with lines increasing in length.
jschult3@ithaca.ed

Anonymous said...

Sry for double post. :(

Anonymous said...

1. The Local X command acts as a variable. In this case X=3. Beginning with 3 the numbers with increase by 4. This will repeat 5 times because of the command REPEAT. repeat 5 [3=3+4]

2. Similar to #1, except x=1 and we multiply instead of add. Beginning with one, numbers multiply by 2. This repeats 5 times.

3. I cannot see the picture, but my guess is that the turtle moves forward and to the right 89 degrees. This is repeated 40 times and each time the figure increases by 4.

4. ....I need SeeLogo!

5. repeat 10 (circle x x+10)
repeat 10 (box x x+10)
repeat 10 (fd+rt 90 x x+10)?

Sorry again Dani that I couldn't get SeeLogo working. I'm also sorry that this is late, I hope I explained myself fully in the email.

Anonymous said...

1. it gives you 3 7 11 15 19

2. It gives you 2 4 8 16 32

3. It ives you a very interesting picture. The 89 was the angle at which the turtle was turned and made the picture more interesting.

4. ?

5. ?

Junior Amazan
jamazan1@ithaca.edu

Dani said...

Maureen McAliney

Problem 1: It is a challenge to guess what will happen. When the
formula is
input, it gives a vertical sequence line of 3, 4, 11, 15, 19. This is because
since x=3 that implies that 3 is the starting point and REPEAT 5 repeats the
program [wrnumx x=x+4] 5 times. The x=x+4 portion was key because the gap
between
the sequence of numbers was 4 as a result.
Problem 2: this gave a vertical sequence line of 1, 2, 4, 8, 16. Since
I previously
understood that * meant multiplication, I could accurately understand how
the sequence
emerged. As a result they were made up of 5 even numbers.
Problem 3: I find it difficult to explain in words what was going on in
this
picture. The Higher the number repeated, the more compact the lines
became. When
I plugged in 200 where 89 had previously been, the design expanded. When I
plugged in Repeat 100 a star formation formed.
Problem 4:
a.) It is [bk 20+39*4]as the 20 stands for the length of the line colored
red, then
39x4 is added on to complete the formation
b.) Since only 1 side length was colored red, it is apparent that that
part was only
a portion of the whole spiral
Problem 5:
1.)the first is drone with the CIRCLE feature, each time the diameter gets
bigger
starting very small with CIRCLE 20, then CIRCLE 30 and so on
2.)this image was drawn using the BOX feature, beginning with BOX 20 20,
then BOX 40
40, and so on

Anonymous said...

1. starting with 3, 5 numbers increased by 4

2. starting with 1, 5 numbers multiplied by 2

3. 89 degrees= how much the drawing rotates
FD= drawing a line and moving it foward
- starting with 20 the line increases 4 times and rotates 89
degrees
4.
- increase line by 4
- line 20+39x4 is red automatically thats the way it is proved.

5.?

Amanda Randel
Arandel1@ithaca.edu

Dani said...

Dani's answers:

1. Guess what this program will do and explain why:
local x
x=3
repeat 5 [wrnum x x=x+4]

Answer: The program will write the numbers 3,7,11,15,19
It starrts with x=3 and adds 4 each time and does it 5 times.
--------------
2. Guess what this program will do and explain why:
local x
x=1
repeat 5 [wrnum x x=x*2]
The program will write the numbers
1,2,4,8,16 since it starts with x=1 and doubles x each time
-------------
3. The program:

local x
x=20
repeat 40 [fd x rt 89 x=x+4]

creates an interesting picture. Can you explain why is this so and what is the role of the number 89 in the picture? What is the point of that 89???? Do you like this picture? try changing the number 89 to other numbers. Can you find a rule? This problem is both mathematical and artistic.

The program creates a kind of a square spiral but not quite so. The number 89 is close to 90. If the command would have been RT 90 it will create an exact square spiral but since we used RT 89 it turns a little less each time. Other interesting numbers are 60, 59 120 or 121 etc. The rule is to take 360 and divide it by a whole number like 2,3,4,5.6 etc. and then change the answer slightly.
------------------
4. A. Explain why the last line of the picture is of length (20+39*4)
B. Explain why the program:

local x
x=20
repeat 40 [fd x rt 89 x=x+4]
lt 89 color red [bk 20+ 39*4]
jt 1000 0
actually proves it

A. The reason why the last lines is of length 20 + 39*4 is the following:
1st line is of length 20, second is of length 20 + 4, third of length 20+4*2 and so on.... so line 40 will be of length 20+39*4
B. Indeed when I run the program the last line turns red and indeed the length of that line was 20 + 39*4 (defined by color red [bk 20+ 39*4]
--------------------
5. 5. There are three pictures in:
http://www.ithaca.edu/dani/classes/Mart/picture_puzzles/sequences.PNG
All three pictures are based on the same sequence:
20,30,40,50....
What are the three programs that make them and why. (Create them yourself)
B. local x
x=10
repeat 10 [circle x rt 90 x = x+10]

or "box x x" or "fd x rt 90" instead of circle x

tati said...

1. starting with 3, the numbers will increase by 4, 5 times.

2. starting with 1, the numbers will multiply by 2, 5 times.

3. the line starts at 20, growing by 4 everytime, as they are rotating at an angle of 89 degrees. I like this picture, its really simple but everytime you change the angle it creates an entirely new drawing.

4a. the last line is at 20+39*4 because the drawing started at 20 and after 39 times it increased its length by 4.

4b. the program proves this because we only wanted to color red the last line so we wrote the amount that we thought it would be and it was correct.

5. the first one can be made by writing GROWBY 50% [CIRCLE 20]

the second can be made by writing GROWBY 50% 10 [box 20 20]

the last one can be made by writing local x, x=10, REPEAT 10 [FD x RT 90 x=x+10]

Dani said...

comments for individuals:

1. Megan:
1,2 fine,
3 look for other interesting numbers like 60, 59 121 73 etc...
4a. good but why 39 and not 40?
4b. good
5. we did not study the growby command but I am happy you are mastering things on your own! check my solutions also.

----------------
Jason,

Look at #3 and 5 again. in #3 what is special with 89. Try other numbers, 90 or 60 or 59... there is a reason there that has to do with 360...

#5 look at the circles:

for example the first one is circle 20 then circle 30 then circle 40... not how to put the words local x x=x+??
repeat circle x and [ ] together somehow to make it work?

----------------
Chrissie Delvalle:

You forgto to write your email (w/o the u)

answers are thoughtful. Try again to get the link in #5. Did you copy and paste the link? It worked for others. What other #'s work instead of 89 in #3?
--------------
Aimee Lillienstein
What happened to #5? in #3 what is special about 89?
-----------------
Vincent Allport.
You convinced me you got it. What is special about the number 89 in #3
----------------
jcarrer1@ithaca.edu
Your work shows full understanding. Number 3 (why 89, what other numbers needs thought)
------------------
Josh 100% understanding
------------------

Anonymous said...

Again, Dani, sorry about being a little late. My internet is not wanting to agree with me this weekend.

1) These commands create a sequence of numbers starting with the number 3 that repeats 5 times, adding 4 to the number previous each time.
2) This, again, creates a sequence of numbers starting with the number 1 that repeats 5 times multiplying the previous number by 2 each time.
3) This creates a tilted looking box swirl picture that looks very cool by the way. The 89 is how far or how many degrees right the turtle turns each time it goes forward 20+4. You are starting with 20 here and adding 4 each time the turtle turns right 89 degrees.
4) a. You know that the last line is 20+39*4 because you are starting with 20, adding 4 each time and repeating it 40 times. If you calculate this out you will get the same number.
b. These commands prove the above because you are asking the program to single out the line 20+39*4 and make it stand out red. You can then clearly see that the last line is 20+39*4.
5) [Megan and I messed around with the GROWBGY command on Thursday. That is how we know it]

GROWBGY 50% 10 [circle 20]

GROWBGY 50% 10 [box 20 20]

local x
x=10
repeat 10 [fd x rt 90 x=x+10]
^ This one is like the example!^
^Sorta^
:)

Unknown said...

Hi Dani. I need to apologize for this being late. I thought this would be due at the start of class, and didn't figure out that it was due today at 2:00 until too late. The best I can do at this point is promise that I didn't read the answers that you sent us in the email. I understand if you can't give me credit.

Answers:
1. The program will give you the numbers 3,7,11,15, and 19. The sequence starts with 3 because x=3, the numbers increase by 4 every time because x=x+4, and there are 5 numbers in the sequence because it is repeated 5 times.

2. You will get the numbers 1,2,4,8 and 16. There are 5 numbers in the sequence because it is repeated 5 times, it begins with 1 because x=1, and every time it will increase to the next power of two because x=x*2.

3. The number 89 causes the rotation to be just under 90 degrees, causing a spikey circle to form. If you use a different number of degrees, the location of every particular spike (of a given length) will change as the amount gone around the circle changes. (Sorry, I couldn't come up with a clearer way to say that.) I think the picture is neat.

4A. The last line is of length 20+39*4 because we add 20 (starting length) to 4n, and the final n is 39 because we asked the computer to repeat 40 times. (40-1).

4B. Since we tell the computer to color the line of length 20+39*4 red, and the longest line becomes red, we know it is 20+39*4 long.

5. Circles:
Local x
x= 10
repeat 10 (circle x x=x+5)

Squares
Local x
x= 5
repeat 10 (box x x x=x+5)

Spiral
Local x
x=5
repeat 10 (fd x x=x+5 rt 90)

Contributors