> "Chance favors the prepared mind." Louis Pasteur
### Who I hope you are
You might be interested in the studio arts--painting, drawing, sculpture, photography--or in architecture.
You may have had experience in graphic, commercial, or industrial design.
Then again, you might be a liberal arts type with a background in language, literature, music, or science.
Or perhaps you are a professional type educated in the field of business, law, medicine, or theology.
You could be a student or a teacher or neither or both.
You may have spent long hours in art studios and possess an exceptionally rich, visual vocabulary.
Then again, your graphic abilities, both verbal and physical, may be very much on the thin side.
Instead, your vocabulary might be skewed toward logic and mathematical terms because your background is in the sciences, philosophy, law, or mathematics.
You may not be able to describe every phase that Picasso went through, but you enjoy looking at art, and you can differentiate a Picasso from, say, a Pissarro when you see them side by side.
You probably have a favorite artist or a favorite period, and you have paintings or reproductions of them in your own home.
While you may not be able to sketch the Acropolis using 3--point perspective, you do have some idea of what perspective means.
You would be intrigued by the suggestion that, in fact, there are dozens of different ways to illustrate objects in space.
At some time in your past, you must have taken a course in geometry.
(Everybody has taken a course in geometry.
It is one of the few bits of liberal
education that we still share.)
What about trigonometry?
You may have forgotten everything, but you aren't brought to the edge of coronary arrest by hearing the words _geometry_ and _trigonometry_.
Finally, and most important, whatever your curriculum vitae says, and whatever type of intellectual or visual baggage you carry, _I hope that you are excited by looking at things and by thinking about how things look._
This book will show you how to increase this kind of excitement by encouraging you to build a special, visual variety of computer models.
If you are stimulated by this idea, then you are exactly who I hope you are.
### Your computer baggage
This chapter gives a very quick summary of basic Logo.
It is brief, not just because I hope that you already know a little Logo but because I expect that you are willing to use the manual that came with your copy of Logo.
In other words, I expect that you are willing to do some learning about Logo mechanics on your own.
If you have never met Logo before, probably you have been introduced to some other computer language and most likely this other language was BASIC.
(I am saddened to think of you learning BASIC before Logo, and this book will give you the chance to right that terrible wrong.)
If you do know something about one computer language, you should be able to plunge happily into the manual of a second language--Logo.
I will give you some directional help, though, by suggesting what questions you need answered in your manual.
Then it will be up to you to learn the specifics.
I assume, too, that you have played around with personal computers and
know how they "feel." You may like or dislike these machines, but your feelings are based on personal experience.
You are familiar with disks, disk drives, keyboards,and program editors.
### No baggage
If you have had no experience with personal computers, and have never tried to learn a computer language--on your own or in a course--you may find this book rough going.
If, on the other hand, you have access to a teacher, tutor, or friend who is willing to give you help when you ask for it--and if you are patient, curious, and tenacious--I think you should stick around.
### Programming as craft
Learning to program in Logo is very much like learning a craft.
You can read about "doing Logo" as you can read about making furniture, and you can talk to others about doing it as well.
But in order to develop the individual talents and skills do old needed for yourself.
For the newcomer to a craft, a master artisan can certainly be of help.
The old timer can suggest small, beginning projects that are reasonably taxing but not overly intimidating.
And by offering encouragement, he can keep the novice's spirits high.
This chapter is designed to reinitiate you into the excitement of Logo craft; all the exercises within the chapter have been fashioned by an experienced craftsman.
These initial projects should be copied.
All artisans begin learning their craft by copying what others have done.
This is not to deny their creativity but rather to allow for a strengthening of the basic skills that support individual creativity.
Good craftsmanship, of course, requires both skill and creative flair.
For my purposes, skills are as much frames of mind as forms of physical dexterity.
For example, in this chapter I will stress the usefulness of three such skills: first, an ability to break down big problems into smaller problems; second, a willingness to imagine yourself as "walking" shapes into existence; and third, a propensity to tinker with your Logo machinery.
Very soon (starting with the exercises at the end of this chapter, in fact) you will be asked to apply these skills to support your own kind of invention.
Craft is about building things by hand, and that is what you will be doing with Logo.
### Copying and tinkering
Copying computer programs is so widespread that I had better give you my opinion about the usefulness of it all.
In the previous paragraph I said that copying was a good thing at the start of one's apprenticeship.
As you go through this chapter, I hope you will want to try out my procedures.
That's OK.
But if you simply type my procedures into your computer, you will only reproduce what I have done.
And that will bore us both.
The book shows what I have done; it doesn't show what you can do.
My procedures offer you a starting place, so that you don't have to build from zero.
But it is up to you to go beyond that start.
So please do copy the ideas of any procedure that strike your fancy.
But, once you have made those ideas work on the screen, play rough with them.
Give the copied procedure funny and outlandish arguments.
(Very big or very small numbers could be outlandish, but what is a funny argument?)
What happens then?
Does your copied procedure still work?
Can you explain how?
Go on to make a few changes inside the body of the procedure; change some of the commands just a little.
Can you guess what might happen before you experiment on these changes?
Get into the habit of tinkering, just a little.
Whenever you write, or copy, a nice procedure, make a few changes to it so that it does something else.
### Equipment
Your most important piece of equipment is a notebook.
It is far more important than the computer you work on and all the technical manuals at your disposal.
Select a notebook with large, unlined, and bound-in pages.
I want you to keep track of your work in this notebook.
That means everything: the little sketches, word portraits, diagrams, procedure listings, the printed images.
Stick in any magazine and newspaper illustrations that strike your fancy, whenever you find them; don't worry aobut organization.
You will be mixing the good with the less than good, the things that worked well with those that never will.
I suggest that a large format notebook is best.
That means plenty of room for a lot of stuff.
Small notebooks encourage crabbed handwriting and get messy; you will need a lot of space.
Also, unlined paper is better.
Since there is no need to write carefully, lines will get in the way.
If you need graph paper for a careful diagram, glue a piece in.
And, finally, the bound--in pages will not let you reorganize the book.
The notebook may organize you.
Glue.
Rubber cement is the Queen of Glues and the world's best notebook adhesive.
Get a lot of it.
Be careful using this glue, though; it is very flammable.
> Appendix A in Brian Harvey's _Computer Science Logo Style_, volume 1: _Intermediate Programming_ (Cambridge, MA: MIT Press, 1985), gives a nice summary of the syntactic differences between Logos. It gives no help with the differences in graphics, though.
You may have a different machine and a different Logo.
To make life as easy as possible, and to eliminate the need to talk about dialects, I have tried hard to avoid using those components that vary most between Logos.
The bad news: this is a book about graphics and graphics is the area in which Logos differ most.
So I skirt any graphics razzle-dazzle that might work in one Logo and not in another.
I don't use funny pen patterns, polygons filled with patterns that look like brick walls or tile roofs, or automatic mirrors that reverse images.
There are no sprites or multiple turtles.
The only colors I use are white, black, and (very occasionally) a reversing pen color.
All the line drawings have been done with a standard, narrow-width pen.
### Caveat emptor
This is a little late for a warning, but here it is anyway: _This is not a bookabout Logo._
You will end up knowing a lot about Logo, and that is no bad thing.
But the goal of the book is to get you to build visual models, and Logo is only a means to that end.
God knows, we could have used Pascal.
But it just so happens that Logo is easier to learn and easier to use than most of the other languages that we could have selected.
Logo notation is neat and tidy; it looks nice on the page and that encourages visual thinking.
But most important, because Logo is so easy to play around with, it won't get in the way.
### Turtles are us
We will concentrate on the graphic parts of Logo.
And that means "turtle graphics."
The intent of Logo's turtle metaphor was to inspire young children to explore shapes.
The turtle is a tiny triangle of light that is moved about the screen via Logo commands.
As the turtle moves, it leaves a trace of light.
Children are encouraged to imagine themselves in the turtle's place and to draw a shape by walking through it, as the turtle would walk through it.
Children have the necessary body knowledge to walk a circle, even though they cannot express their circle drawing rules before walking them.
Walking the turtle around an invisible circle translates the body's knowledge into word commands:
"I'm walking him forward a little bit, now I'll turn him a little, I'm walking him forward a little bit, now I'll turn him a little...
I'll keep doing this until until he's finished.
Yes, that's it; I'm back where I started."
Once said, the words are available to be transformed into Logo commands.
Because adult bodies may be more spatially intuitive than children's, your turtle visualizations can be far more effective than a child's.
There is a problem with adults, though; they aren't used to playing imagination games as adults and must be coaxed into it.
Children are happy to play silly games; adults may be embarrassed to try.
I will be asking you, after all, to imagine yourself as an electronic turtle.
And what would that feel like, I mean physically?
Use your turtle body and walk around a bit.
Don't reject visualization and muscular thinking before you try it.
What was good enough for Uncle Albert should be good enough for you.
Listen to what he said:
"The physical entities which seem to serve as elements in thought are certain signs and more or less clear images which can be 'voluntarily' reproduced and combined... this combinatory play seems to be the essential feature of productive thought.
The above elements are, in my case, of the visual and some of the muscular type."--Albert Einstein
### Turtle space
Turtles live on your computer screen.
Make sure you know the size of yours, since different computer screens have different dimensions.
Screen dimensions are generally stated in vertical (the y-axis direction) and horizontal (the x-axis direction) measurements.
Pinpoint the `x = 0` and `y = 0` point on your screen.
The turtle can be moved about the screen using cartesian x-y coordinates or turtle coordinates.
Cartesian commands send the turtle to a specific xy position on the screen, without regard to the turtle's current position.
Notice that the line `repeat 4 { forward! (50); right! (0.25) }` is a kind of operational definition of what a square is: a square is four sides, four `fd` commands, with each side joined at right angles to the next, the `RT 90` commands.
That's tidy, but it's still a bore to type two lines each time you want a size 50 box on the screen.
After all, you may want to draw 100 boxes.
Wouldn't it be convenient to be able to "tell" Logo your definition of a square and then to give that definition a name?
### Logo procedures group commands under a single name
You can group a series of Logo commands together under a single name by writing a Logo procedure.
The name of the procedure is a shorthand for all commands included in it.
Typing the name of the procedure tells Logo to automatically execute each line of the procedure in turn, just as if you had typed them, one after another, on the keyboard.
Unless you move the turtle to a different starting point, each time you type `box50`, the square produced will be on top of the previously drawn figure.
{{Figure 4: Differently sized boxes. Top of p. 15.}}
### Funny feelings
Do you have a funny feeling that this isn't enough, that we aren't producing great enough images?
Let's think about this for a while.
Drawing with Logo should not be the same as drawing with a pen or pencil.
What can be sketched quickly by hand is unbearably tedious to sketch with Logo.
You may have tried sketching with Logo by moving the turtle as you would move your sketching hand.
It doesn't satisfy, and it doesn't work.
Logo is a unique medium for visual expression; don't expect it to be like other media.
Visual modeling with Logo is as different from drawing as clay modeling is different from photography.
Our Logo media is a visual modeling media.
We use it best to build models.
Why?
To encourage us to think about shapes.
The drawing is done to encourage thinking.
So don't worry too much (now) about the final image.
Don't worry if your designs aren't amazingly beautiful; don't be concerned if they aren't "arty."
This isn't, after all, a book about computer "art," but it might be useful to think about ART for a minute.
Here is a quote from a computer art type, Harold Cohen from the University of California at San Diego:
"For most people outside of art, probably, art is directed primarily at the production of beautiful objects and interesting images; and who is to argue that a complicated Lissajou figure is less beautiful than an Elsworth Kelly painting or a Jackson Pollock; or that a machine simulation of Mondrian is less interesting than the original it plagiarizes?
To talk of beauty or of interest is to talk of taste, and matters of taste cannot be argued with much profit.
The fact is that art is not, and never has been, concerned primarily with the making of beautiful or interesting patterns.
The real power, the real magic, which remains still in the hands of the elite, rests not in the making of images, but in the conjuring of meaning."
A little professorial, this.
But do you think he has a point?
Go back to your demonstration procedures, the ones that have _no_ arguments so they do only _one_ thing.
A procedure that does only one thing is like a box drawing procedure that draws only one size of box.
One box doesn't encourage much thinking about the nature of boxes, does it?
Can you use your demonstration procedures to explore the nature of a collage that intrigues you?
Play around with the collage demonstration procedure that draws it.
Tinker a bit.
Maybe you could generalize the demonstration procedure by adding an argument.
To generalize a procedure is to stretch your thinking about what it does; and that's our appropriate work, too, because it respects the uniqueness of the Logo art medium.
"It's the tinkering that counts, not the artiness."
Next, we generalized the `box!` procedure with an argument so that it could draw boxes of any size.
Finally, we produced a still more general procedure, `ngon!`, that can draw any regular, polygonal "box"--triangles, squares, pentagons, hexagons, and so on--of whatever size we wanted.
Every time you use `spingon`, you must remember to type four numbers after it.
Second, this procedure is recursive: the last line in the `spingon` procedure asks that `spingon` be done again, but with some arguments changed.
For example, `(edge)` becomes `mult (edge, growth)` the first time recursion is called; and then `mult (edge, growth)` becomes `mult (mult (edge, growth), growth)` the
Before ending this chapter, let me give you a few more items to review from your Logo language manual.
The topic that gives most students the most problems is one of the most boring things to talk about: file maintenance.
So I won't talk about it.
But please review how to save text material as files, how to retrieve material from files, how to erase files, how to catalog files, and how to print files.
Do the same review for storing and retrieving graphics information.
### A note on the procedure presentation style used in this book
I have tried to make the presentation of procedures in this book as readable as
possible.
Here are several of my presentation rules.
First, the _many comments_ rule.
I have included wordy explanations in some of my procedures.
Procedures should be laid out nicely on the page without too much information on anyone line.
Long procedure statements should be divided up between lines to make them more readable.
The special character "`-`" is used to indicate when a single Logo statement has been continued from one line to the next.
Here is an example.
Notice that the Logo material within the [repeat brackets] would have been difficult to read if the long statement had not been divided into several short lines.
Make `ngon!` more versatile by doing two things to it.
First, improve `ngon!` so that it will draw polygons _around a central point_; and second, improve `ngon!` so that it can be given an argument that specifies not the length of an edge of the polygon but the _radius of the polygon_.
You might want to think some more about the exercise, described above, of placing simple shapes on a blank field of paper to depict different feelings of balance or emotions.
A painting by the Russian artist Kasimir Malevich is reproduced below.
What could be more elegant that these eight red rectangles?
(That' s the title, by the way.)
What emotion do you feel when looking at this littel reproduction?
Can you do something similar?
{{Figure 12: Kasimir Malevich, _Eight Red Rectangles_. https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Malevich-Suprematism..jpg/640px-Malevich-Suprematism..jpg. Bottom of p. 31.}}
Mark the vertex arrival place in the `cngon!` procedure.
You might consider this location as the right spot to install some recursion: when the turtle arrives at any vertex, ask it to do another `cngon!` centered on that vertex.