Monday, April 28, 2008
Access day one
Today, Projects 3A, 3B, and 3K in the green book. (These are projects 12A and 12B if you have the enormous green book.) Please complete A and B and mail them to yourself before Wednesday's class.
Thursday, April 24, 2008
Monday, April 21, 2008
for Monday, April 21 and Wednesday, April 23
Today we will talk more about x-y geometry in Logo. Then you can choose to use either x-y or turtle geometry in your program.
We will also talk about random numbers. This means choosing a number by chance, not knowing in advance what it will be. This is how computers simulate playing cards and rolling dice. (Cards and dice are truly random, in a fair game; in a computer, since it's a program, it's pseudo-random.)
See page 10 of the handout for a random walk. See the program bug for a simple, silly example.
Working by yourself or with your partner, write a program surprise with (at least!) these three elements:
You'll need three sets of if statements to make this work. See page 10 for one set of if statements.
I usually prefer to work with a set of colors that I have chosen in advance, but you can make your colors completely random — the post below this one tells how.
Suggestion: work on the three required elements separately, then combine them. Everything you need to know is in the Logo handout! The beauty of programming is that you don't have to do it in a prescribed way; you are free to invent your own alternative way of doing things.
Submit your work by showing it to me at your desk, then copying the text of your program (with all its procedures) into an e-mail to me. If you work with another student, then make sure that both programmers send me the e-mail.
We will also talk about random numbers. This means choosing a number by chance, not knowing in advance what it will be. This is how computers simulate playing cards and rolling dice. (Cards and dice are truly random, in a fair game; in a computer, since it's a program, it's pseudo-random.)
See page 10 of the handout for a random walk. See the program bug for a simple, silly example.
Working by yourself or with your partner, write a program surprise with (at least!) these three elements:
- randomly chosen regular polygon or star
- drawn in a randomly chosen location
- in a randomly chosen color
You'll need three sets of if statements to make this work. See page 10 for one set of if statements.
I usually prefer to work with a set of colors that I have chosen in advance, but you can make your colors completely random — the post below this one tells how.
Suggestion: work on the three required elements separately, then combine them. Everything you need to know is in the Logo handout! The beauty of programming is that you don't have to do it in a prescribed way; you are free to invent your own alternative way of doing things.
Submit your work by showing it to me at your desk, then copying the text of your program (with all its procedures) into an e-mail to me. If you work with another student, then make sure that both programmers send me the e-mail.
Saturday, April 19, 2008
Random colors, filling an enclosed space
I usually do random colors by selecting one from a set of several using if statments (e.g., if :rn = 2 [...set pen to second color choice...]), but here's a way of making your color even more unknown:
Here are methods for making a square frame in the center of the screen and then filling with random colors:
to randomColor
make "myRed random 256
make "myGreen random 256
make "myBlue random 256
setpc (list :myRed :myGreen :myBlue)
setfc (list :myRed :myGreen :myBlue)
end
Here are methods for making a square frame in the center of the screen and then filling with random colors:
to centerSquare
penup
; go to lower right corner of square
bk 300 rt 90 fd 300 lt 90
pendown
repeat 4 [fd 600 lt 90]
; back to center
penup
fd 300 lt 90 fd 300 rt 90
end
to centerSquareColors
hideturtle
clearscreen
repeat 100 [
randomColor
centerSquare
fill
wait 75
]
showturtle
end
Saturday, April 12, 2008
Logo day 3
Objective 1: to understand the idea of writing a procedure rather than commanding the turtle one line at a time.
Objective 2: using a procedure within a procedure and a loop, make a flower out of a squiggle. Like this:
Certain choices for X and Y will guarantee a wonderful rotational symmetry. But what are they? Figure that out.
Objective 3: a word flower. I will show you a simple example.
Objective 5: to enhance our drawings with color that is changed by the program.
Objective 2: using a procedure within a procedure and a loop, make a flower out of a squiggle. Like this:
to squiggle
... your code for a squiggle here ...
end
to flower
repeat X [
squiggle
rt Y
... or lt Y ...
... optional fd N or bk N ...
... or some combination of these ...
]
end
Certain choices for X and Y will guarantee a wonderful rotational symmetry. But what are they? Figure that out.
Objective 3: a word flower. I will show you a simple example.
Objective 5: to enhance our drawings with color that is changed by the program.
Monday, April 07, 2008
Logo day 1
Today I will bring hard copies of my minimum opus on Logo, which you may also view here — click.
In case you're at a machine without Logo, download this, which is MSW Logo by George Mills et al.
I do hope that you will find this art site as inspirational as I do.
Here's a concise list of commands for Logo, which is taken from this wonderful complete college course in computing with Logo.
You can also read Brian Harvey's books online (scroll down the page) — click. Serious fun.
In case you're at a machine without Logo, download this, which is MSW Logo by George Mills et al.
I do hope that you will find this art site as inspirational as I do.
Here's a concise list of commands for Logo, which is taken from this wonderful complete college course in computing with Logo.
You can also read Brian Harvey's books online (scroll down the page) — click. Serious fun.
Subscribe to:
Posts (Atom)