709 lines
35 KiB
Markdown
709 lines
35 KiB
Markdown
## Chapter 2
|
|
# Visual Modeling
|
|
|
|
> In the case of miniatures, in contrast to what happens when we try to understand an object or living creature of real dimensions, knowledge of the whole precedes knowledge of the parts.
|
|
And even if this is an illusion, the point of the procedure is to create or sustain the illusion, which gratifies the intelligence and gives rise to a sense of pleasure which can already be called a es the tic.
|
|
> Claude Levi-Strauss, _The Savage Mind_
|
|
|
|
### Models
|
|
Most physical models are miniatures, smaller versions of something else.
|
|
Model railroad engines are good examples, and many of us have had pleasant experiences with them.
|
|
They can be picked up and looked at from any angle, and they can be experimented with, too.
|
|
How many wagons, for example, can a model locomotive pull?
|
|
Attach 10 wagons and see if the locomotive can pull them.
|
|
And if you should sit beneath a model railway bridge when the tiny engine rolls across it, pulling all those wagons, what will the sound be like?
|
|
Will it be like the real thing?
|
|
Listen carefully and you will experience a double thrill: an excitement that comes from using a model to hear how a full-sized locomotive might sound; an excitement that comesfrom simply playing, on your own terms, with a miniaturized piece of the world.
|
|
|
|
I believe that this kind of play, because it encourages us to look more closely at our world, is very useful enjoyment.
|
|
In addition, I am convinced that the clarity of vision developed by such play is best pursued by involving ourselves, not in just the manipulation of models but in their design and construction as well.
|
|
|
|
This book is about a special kind of modeling that explores patterns and visual images.
|
|
Sometimes we will create designs using visual models of machines that are very much from the real world.
|
|
Other times, images will be produced by more abstract or imaginary machinery.
|
|
All our models though, whatever they represent, will be constructed from Logo procedures.
|
|
Logo is the raw material, but this book is not about Logo.
|
|
In fact, you must try hard not to let Logo get in the way of your model building craft.
|
|
Models first.
|
|
OK?
|
|
|
|
OK.
|
|
No more introduction.
|
|
Let's build an image-producing machine using Logo.
|
|
But first...
|
|
|
|
### An important pause in the narrative
|
|
What comes next requires that you have a fair understanding of the Logo language.
|
|
But what, you ask, does fair mean?
|
|
If you haven't yet looked at the material in Chapter 1, now is the time.
|
|
Chapter 1 will let you compare your current knowledge of Logo mechanics with what you will need to build the visual model described in the next section.
|
|
Don't just scan Chapter 1; go through the examples in the text, and try out the exercises at the chapter's end.
|
|
|
|
Even if you already know some Logo, a review probably would be helpful.
|
|
Chapter 1 describes much of the geometry and trigonometry used throughout the book, so now is a good time to review that material.
|
|
Try to apply some geometry to a few of my exercises.
|
|
In addition, Chapter 1 will introduce you to my Logo-talking style; maybe you should get used to that style right away.
|
|
Be sure to spend some time working on the centered polygon assignment.
|
|
This exercise combines a review of Logo, the introduction of turtle walks, and simple geometry.
|
|
|
|
Go back and take at peek at Chapter 1 right now.
|
|
Have a good read and take your time with it.
|
|
If you are a real Logo high-flier, test your flair by doing the exercises at the end of Chapter 1, before you glance through the hints given there.
|
|
After having a go at these problems, compare your Logo style with mine.
|
|
|
|
### On to modeling
|
|
I have decided to begin this work with something concrete, something selected from the world of things.
|
|
We can do some abstract modeling of ideas or emotions later on.
|
|
The example that follows is a description of a device that I vaguely remember seeing described in an old Scientific American magazine.
|
|
I've called it a pipe- and-roller machine.
|
|
I never built the thing, but I always wanted to see how it worked.
|
|
|
|
### Pipes and rollers
|
|
Imagine that we are wandering about a construction site where there are useful bits and pieces lying about, free for the taking.
|
|
While this wandering will be done only in our minds, the images seen there are based on impressions from past, real excursions.
|
|
|
|
We will need some short sections of plastic pipe, the kind used for plumbing.
|
|
Try to find as many different-diametered pipes as you can.
|
|
Here is a sketch of what you might have picked up so far.
|
|
|
|
##### FIGURE 1: Pipes
|
|
|
|
Next, let's assemble a collection of wooden dowels of various diameters, from very small diameters to very large ones.
|
|
Dowels, or rounded wooden pegs, are used to join together adjacent parts by fitting tightly into two corresponding holes.
|
|
Dowels are used by cabinetmakers to assemble fine pieces of furniture when nails or screws would be unsightly; and large dowel-pegs are still used to fit together wooden beams when aesthetics are more important than cost.
|
|
Call the dowels that you have assembled "rollers"; you will see why in just a minute.
|
|
Here is a sketch of my dowel collection.
|
|
(Sketches are models, too.)
|
|
|
|
##### FIGURE 2: Dowels
|
|
|
|
### Assembling the pipe-and-roller machine
|
|
Now, imagine that one section of pipe is floating in the air at eye level; one end of the pipe is clearly visible to us, and the pipe's length is parallel to the ground.
|
|
Now, hold one of the dowel-rollers parallel to the length of the pipe and place it on top of the pipe.
|
|
|
|
##### FIGURE 3: Dowel-on-pipe
|
|
|
|
Next, imagine rolling the dowel around the circumference of the pipe until it arrives back at its starting position at the top of the pipe.
|
|
You will have to hold the roller very carefully so that it doesn't slip on the pipe but rolls nicely in contact with the pipe.
|
|
If you roll the dowel around the pipe in a counterclockwise direction, the dowel will also turn counterclockwise.
|
|
|
|
##### FIGURES 4 & 5: Dowel rotations around the pipe
|
|
|
|
The dowel would turn in a clockwise direction if the rolling-about-the-pipe was also in a clockwise direction.
|
|
Note the two motions of the roller: the roller goes around the pipe as it turns around it own center.
|
|
The two centers, the center of the pipe and the center of the roller, will feature in all our calculations.
|
|
|
|
Now that you have an image of the physical machine in your mind's eye, I can ask you to begin manipulating the parts of the image.
|
|
Imagine playing with this model in your mind.
|
|
What will the roller "look like" as it rolls around the pipe?
|
|
Can you draw a picture of it?
|
|
Or better still, can you create a Logo model of this roller/pipe machine that can _illustrate_ the motions for us?
|
|
|
|
Imagine, for example, that we glue an arrow onto the end of the roller.
|
|
|
|
##### FIGURE 6: Arrow on roller
|
|
|
|
What pattern will the tip of this arrow trace out as the roller moves around the pipe?
|
|
Imagine a series of photographs taken at regular intervals as the roller moves around the pipe.
|
|
Let's construct a Logo machine that will work in this photographic way.
|
|
In other words, let's build a Logo machine to model the physical pipe-and-roller events visually.
|
|
|
|
### Roller talk
|
|
At first glance, this exercise looks pretty difficult, certainly more complicated than the centered polygon problem discussed in Chapter 1.
|
|
But, if we could just break this problem down into smaller, more manageable parts, as we broke the polygon problem down, some of the complexity might vanish.
|
|
So let's set about doing just that.
|
|
|
|
First, we can talk about the geometry of rolling cylinders to see what we already know.
|
|
Then, we can do a turtle-walk scenario- with sketches and words.
|
|
Finally, Logo will act as the glue to stick all the individual parts together.
|
|
|
|
Look at the figure on the left below.
|
|
We see the roller at the top of the pipe, position (a), and then rolled counterclockwise around the pipe to position (b).
|
|
How much has the roller turned between points (a) and (b)?
|
|
The dark bands in the figure indicate the contact surfaces between the roller and the pipe.
|
|
If there is no slipping, the length of the band on the roller must equal the length of the band of the pipe.
|
|
Why?
|
|
|
|
##### FIGURES 7 & 8: Rotation diagrams.
|
|
|
|
We could think of this rolling in another way.
|
|
See the figure on the right above.
|
|
Imagine that the roller stays fixed at position (a).
|
|
The roller now rotates at (a) while the pipe is rotated- clockwise- underneath it from (b) to (a).
|
|
In this alternative view, the roller also turns in a counterclockwise manner, by the distance indicated by the dark band.
|
|
Here, as in the figure on the left, the length of the band on the pipe must equal the length of the band on the roller.
|
|
|
|
How can we calculate the lengths of these bands?
|
|
First, note that the bands can be described as segments of a circle, that is, some fraction of the total circumference of a circle.
|
|
Well, what do we know about circumferences?
|
|
Any circle's circumference, C, equals 2πR, where R is the radius of the circle.
|
|
Now look at the figure on the next page.
|
|
|
|
##### FIGURE 9: Rotation diagram with labelled angles.
|
|
|
|
The band on the pipe is some fraction of the circumference of the pipe.
|
|
This fraction is the angle θ (theta), measured in degrees, divided by 360, the total number of degrees in a circle.
|
|
The length of the band on the pipe is, therefore, 2πR<sub>p</sub>θ/360, where R<sub>p</sub> is the radius of the pipe.
|
|
The same thinking provides the length of the band on the roller: 2πR<sub>r</sub>φ/360.
|
|
Here, R<sub>r</sub> is the radius of the roller.
|
|
|
|
What next?
|
|
We can set these two expressions equal to each other, since the physical dimensions they represent are equal to each other in length.
|
|
Then we can rearrange terms to express φ (phi), the degree rotation of the roller, in terms of θ, the degree distance between (a) and (b).
|
|
Here it is:
|
|
|
|
> φ = θR<sub>p</sub>/R<sub>r</sub>.
|
|
|
|
This rotation expression is very convenient.
|
|
If we know how many times we want to photograph the roller on its way around the pipe, we can calculate θ, the degree distance between stoppings, by dividing 360 by the number of stoppings.
|
|
And knowing the radius of the pipe and of the roller, we can use the tidy expression above to calculate φ, the relative rotation of the roller from one stopping point to the next.
|
|
|
|
So much for the roller talk.
|
|
But before we go on to the turtle walk, will you admit that you know more about this problem than you thought you knew at the outset?
|
|
Listen: breaking big problems down into smaller ones makes getting started easier.
|
|
And once you get started moving in any direction, you will discover that you are already familiar with much of the scenery.
|
|
|
|
### A turtle walk around the pipe
|
|
Remember that a turtle-walk scenario describes in words and sketches how you want the turtle to walk through a design.
|
|
Let yourself go, but be specific.
|
|
Addressing your instructions to the turtle and talking out loud may be helpful.
|
|
Let's use the sketches on the next page as the focal point of this scenario.
|
|
I have divided my turtle walk into small scenes and have given each a letter designation.
|
|
|
|
The previous shapes in this section were drawn with Logo procedures, but I have intentionally left the following figures in freehand form; they are taken from my own Logo notebook.
|
|
I wanted to remind you that sketches come before Logo procedures that draw rounder circles.
|
|
The following sketches record my visual doodling about this particular problem.
|
|
But to appreciate the usefulness of sketches, you must do some yourself.
|
|
Don't just look at my examples.
|
|
Because sketches can be effective visual aids for careful thinking, they need to be drawn carefully.
|
|
I occasionally use rulers and a compass, but not always.
|
|
Of course, the small diagrams on the next page are final sketches, not beginning ones.
|
|
Final drawings, like final Logo procedures, are the results of many preliminary studies, many of which did not "work out properly."
|
|
|
|
### Word description of the turtle walk
|
|
|
|
#### Diagram A: Drawing the pipe
|
|
|
|
Begin at position (1) facing straight up.
|
|
Draw a circle around point (1) with radius R<sub>p</sub>.
|
|
This will be easyto do using `cngon`.
|
|
(This procedure is listed below, but see Chapter1 for a full description of it.
|
|
Think of it as a black-box procedure
|
|
|
|
DIAGRAMS A through H: Turtle walk sketches of the roller-pipe machine.
|
|
|
|
that draws regular polygons around a central point.
|
|
`cngon` takes two arguments: `n`, the number of sides of the polygon to be drawn, and `rad`, the radius of the circle that circumscribes the polygon. For example, `cngon (20, 60)` would draw a circle--a 20-sided polygon--of radius 60.
|
|
The turtle's current position defines the _center_ around which the polygon would be drawn.)
|
|
|
|
#### Diagram B: Drawing the roller in its first position on the top of the pipe
|
|
Next, pick up the pen and move to position (2), the center of the roller.
|
|
This distance is R<sub>p</sub> + R<sub>r</sub>.
|
|
Now draw a circle of radius R<sub>r</sub> centered on position (2) to illustrate the roller.
|
|
|
|
#### Diagram C: Orienting the roller in preparation for drawing the arrow
|
|
Since the roller has not yet moved from the starting position, it hasn't done any rolling.
|
|
Hence, the arrow can be drawn poiunting straight up, and that is the direction in which you are facing.
|
|
Draw the arrow starting from position (2) and get back to this position when you are finished.
|
|
|
|
#### Diagram D: Getting back to the center of the pipe
|
|
Pick up the pen and move back to the center of the pipe, position (1).
|
|
|
|
#### Diagram E: Getting to the next stopping position of the roller
|
|
Turn left by angle θ, and go forward to position (3).
|
|
At point (3) you must correctly orient the roller before drawing the arrow.
|
|
Because the roller has now rolled a bit to the left of its starting position at point (2), the arrow will no longer point in the same direction as the line: (1) to (3).
|
|
It will be turned some amount to the left of it.
|
|
What must you take into account to calculate the rotation amount?
|
|
|
|
#### Diagram F: Orienting the roller and drawing the arrow
|
|
The roller has moved from position (2) to position (3) by rotating about its own center.
|
|
We used the symbol φ to indicate this rotation.
|
|
The angle φ is measured relative to the dotted line linking the centers of the pipe and roller: (1) to (3).
|
|
You have arrived at position (3), pointing along the axis (1) to (3).
|
|
If you now turn left by angle φ=θR<sub>p</sub>/R<sub>r</sub>, you will be facing in the correct direction to draw the arrow.
|
|
Draw the roller circle, too.
|
|
|
|
#### Diagram G: Getting back to the center of the pipe
|
|
Turn right by φ, pick up the pen, and move back down to (1).
|
|
|
|
#### Diagram H: Preparing for the next roller stopping position
|
|
Get ready to draw the next roller image: turn left by angle θ and move out to position (4).
|
|
The roller rotation angle at the point (4) is again measured relative to the dotted line linking points (1) to (4).
|
|
Why?
|
|
|
|
Angle φ at position (4) equals 2θR<sub>p</sub>/R<sub>r</sub>.
|
|
Why 2θ?
|
|
Because φ must be calculated relative to the starting position, and the roller has moved 2θ degrees from the starting position (2).
|
|
Turtle: you may now turn left by φ, draw the arrow, turn right by φ, and go back down to the center of the pipe.
|
|
|
|
Angle φ at the next stopping position (5) is not shown in the will be 3θR<sub>p</sub>/R<sub>r</sub>.
|
|
Why?
|
|
Draw a few diagrams to convince yourself of all this.
|
|
Go back and look at Figures 7 and 8 for some help.
|
|
|
|
### A turtle walk transfonned into Logo procedures
|
|
To start, recall that we have to glue an arrow onto the face of the roller.
|
|
So let's write a procedure to draw an arrow of any shaft length `len`.
|
|
|
|
##### Figure 10: Shaft/arrow diagrams
|
|
|
|
```
|
|
fn arrow! (len) -> {
|
|
& To draw a simple arrow of shaft; each tip is given by len * 0.2.
|
|
pendown! ()
|
|
forward! (len)
|
|
let tip_angle = 0.4
|
|
let tip_len = mult (0.2, len)
|
|
left! (tip_angle)
|
|
forward! (tip_len)
|
|
back! (tip_len)
|
|
right! (mult (tip_angle, 2))
|
|
forward! (tip_len)
|
|
back! (tip_len)
|
|
left! (tip_angle)
|
|
back! (len)
|
|
}
|
|
```
|
|
### `pipegon!`s
|
|
Let's call the procedure that will carry out this turtle walk `pipegon!`.
|
|
What will be the arguments?
|
|
Certainly the radius of the pipe and the radius of the roller will be needed.
|
|
We will also need to know e and how many stopping points we would like to photograph.
|
|
Here is the list of arguments so far:
|
|
* `pipe_rad`, the radius of the pipe
|
|
* `roll_rad`, the radius of the roller
|
|
* `theta`, the angle distance between stopping places
|
|
* `n`, the number of stopping places
|
|
|
|
Let's add one more, `total_angle`, that will keep track of the total of the angle turned from the starting roller position.
|
|
We can now write the first line of `pipegon!`:
|
|
|
|
```
|
|
fn pipegon! (pipe_rad, roll_rad, theta, total_angle, n) ->
|
|
```
|
|
|
|
How do you feel about rushing right into doing the rest?
|
|
The following is not my first "rush" or even the second.
|
|
My first few attempts had bugs in them, and they didn't work as I had planned.
|
|
But procedures almost never work the first time.
|
|
That's OK as long as your energy is up to fixing them.
|
|
|
|
```
|
|
fn pipegon! (pipe_rad
|
|
roll_rad
|
|
theta
|
|
total_angle
|
|
n) -> {
|
|
if lt? (n, 1) then cngon! (20, pipe_rad)
|
|
else {
|
|
penup! ()
|
|
forward! (add (pipe_rad, roll_rad))
|
|
pendown! ()
|
|
left! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
arrow! (mult (1.5, roll_rad))
|
|
cngon! (20, roll_rad)
|
|
rt! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
penup! ()
|
|
back! (add (pipe_rad, roll_rad))
|
|
left! (theta)
|
|
pipegon! (pipe_rad
|
|
roll_rad
|
|
theta
|
|
add (total_angle
|
|
theta)
|
|
dec (n))
|
|
}
|
|
}
|
|
```
|
|
|
|
### Supporting procedures
|
|
```
|
|
fn ngon! (n, edge) -> {
|
|
& To draw an `n`-sided polygon. The first *edge* will be
|
|
& drawn *from* the turtle's current position, and its length
|
|
& is given by `edge`.
|
|
repeat n {
|
|
forward! (edge)
|
|
right! (inv (n))
|
|
}
|
|
}
|
|
|
|
fn cngon! (n, radius) -> {
|
|
& To draw an `n`-sided polygon *centered* on the turtle's
|
|
& current position. `radius` is the radius of the circle that
|
|
& would pass through all of the polygon's vertices.
|
|
& See Chapter 1 for a full description of `cngon!`.
|
|
let angle = add (inv (4), inv (mult (2, n)))
|
|
let edge = mult (2, radius, sin (inv (mult (2, n))))
|
|
|
|
penup! ()
|
|
forward! (radius)
|
|
right! (angle)
|
|
pendown! ()
|
|
ngon! (n, edge)
|
|
left! (angle)
|
|
penup! ()
|
|
back! (radius)
|
|
pendown! ()
|
|
}
|
|
```
|
|
### Some `pipegon!` productions
|
|
I typed `pipegon! (60, 30, inv (6), 0, 6)`. This models, in a visual way, the rolling of a roller of radius 30 around the circumference of a 60 radius pipe.
|
|
The roller stops along the circumference every sixth turn, and 6 rollers will be drawn.
|
|
The argument `total_angle` is given an initial value of 0.
|
|
What is `total_angle` being used for?
|
|
What happens if you begin with some other value, say 0.12?
|
|
|
|
##### FIGURE 11: Up-and-down `pipegon!`
|
|
|
|
One last point.
|
|
In my turtle-walk scenario I drew the pipe circle before doing anything else.
|
|
The procedure `pipegon!` draws it last.
|
|
Why did I change the order of things?
|
|
Well, I wanted to use recursion and to be able to specify the number of times recursion would happen.
|
|
I used the argument `n` to take care of this.
|
|
`pipegon!`'s first line looks at the current value of `n`; when `n` "becomes zero, `pipegon!` should be stopped.
|
|
It is easier to know when a procedure should be stopped than when it has just begun, and this seemed a nice place to draw the pipe, after all the rollers had been drawn.
|
|
Could you reorganize the procedure to draw the pipe before drawing any of the rollers?
|
|
|
|
### Exploring `pipegon!`dynamics
|
|
One of the pleasures of modeling is playing with the little model you have built.
|
|
Let's fiddle with `pipegon!`'s parts to seewhat happens.
|
|
I will show you only a few things to give you the idea.
|
|
Let's start with some different argument values.
|
|
|
|
Here is the portrait of `pipegon! (60, 30, inv (180), 0, 180)`.
|
|
|
|
##### FIGURE 12: Many-arrowed-and-circled `pipegon!`
|
|
|
|
But I don't like all those circles.
|
|
So I removed `pipegon!`'s twelfth line.
|
|
Here is the new version.
|
|
The commented line marks where the line was removed from the original version of the procedure.
|
|
|
|
```
|
|
& |- arrow-only pipegon
|
|
fn a_pipegon! (pipe_rad & <-- note the new name
|
|
roll_rad
|
|
theta
|
|
total_angle
|
|
n) -> {
|
|
if lt? (n, 1) then cngon! (90, pipe_rad)
|
|
else {
|
|
penup! ()
|
|
forward! (add (pipe_rad, roll_rad))
|
|
pendown! ()
|
|
left! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
arrow! (mult (1.5, roll_rad))
|
|
&&& LINE REMOVED: cngon! (90, roll_rad)
|
|
rt! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
penup! ()
|
|
back! (add (pipe_rad, roll_rad))
|
|
left! (theta)
|
|
a_pipegon! (pipe_rad & <-- note the name changed here
|
|
roll_rad
|
|
theta
|
|
add (total_angle
|
|
theta)
|
|
dec (n))
|
|
}
|
|
}
|
|
```
|
|
Now this is a portrait of `a_pipegon! (60, 30, inv (180), 0, 180)`.
|
|
|
|
##### FIGURE 13: Arrow-only `a_pipegon!`
|
|
|
|
Instead of drawing an arrow on the roller, let's draw a stripe along a diameter.
|
|
We can use `cngon!` to draw a two-sided polygon with radius equal to the roller.
|
|
We take out the `arrow!` procedure and insert `cngon!`.
|
|
|
|
Here it is:
|
|
```
|
|
& |- stripe-pipegon
|
|
fn s_pipegon! (pipe_rad & <-- note another new name
|
|
roll_rad
|
|
theta
|
|
total_angle
|
|
n) -> {
|
|
if lt? (n, 1) then cngon! (90, pipe_rad)
|
|
else {
|
|
penup! ()
|
|
forward! (add (pipe_rad, roll_rad))
|
|
pendown! ()
|
|
left! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
cngon! (2, roll_rad) & <-- removed the call to `arrow!`
|
|
rt! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
penup! ()
|
|
back! (add (pipe_rad, roll_rad))
|
|
left! (theta)
|
|
s_pipegon! (pipe_rad & <-- new name
|
|
roll_rad
|
|
theta
|
|
add (total_angle
|
|
theta)
|
|
dec (n))
|
|
}
|
|
}
|
|
```
|
|
And here is a portrait of `s_pipegon! (60, 30, inv (180), 0, 180)`.
|
|
|
|
##### FIGURE 14: Stripe-pipegon
|
|
|
|
Now, imagine an invisible arrow glued to the front of the roller.
|
|
At the tip, there is a flashing light.
|
|
Here is the new part to fit into our `pipegon!` machine:
|
|
|
|
```
|
|
fn flash! (len) -> {
|
|
& Flashes a light at distance `len` from the starting point,
|
|
& and returns the turtle to where it started.
|
|
penup! ()
|
|
forward! (len)
|
|
pendown! ()
|
|
repeat 6 {
|
|
forward! (2)
|
|
back! (2)
|
|
right! (inv (6))
|
|
}
|
|
penup! ()
|
|
back! (len)
|
|
pendown! ()
|
|
}
|
|
```
|
|
|
|
To install `flash` into `pipegon!`, we could fix a value for `len`, perhaps based on the value for `roll_rad`.
|
|
Or we could extend `pipegon!` by adding another argument.
|
|
Call the extension `l_pipegon`:
|
|
|
|
```
|
|
fn l_pipegon! (pipe_rad & <-- new name
|
|
roll_rad
|
|
flash_len & <-- new arg
|
|
theta
|
|
total_angle
|
|
n) -> {
|
|
if lt? (n, 1) then cngon! (90, pipe_rad)
|
|
else {
|
|
penup! ()
|
|
forward! (add (pipe_rad, roll_rad))
|
|
pendown! ()
|
|
left! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
flash! (flash_len) & <-- call to `cngon!` replaced with `flash!`
|
|
rt! (mult (total_angle, div (pipe_rad, roll_rad)))
|
|
penup! ()
|
|
back! (add (pipe_rad, roll_rad))
|
|
left! (theta)
|
|
l_pipegon! (pipe_rad & <-- new name
|
|
roll_rad
|
|
flash_len & <-- new arg
|
|
theta
|
|
add (total_angle
|
|
theta)
|
|
dec (n))
|
|
}
|
|
}
|
|
```
|
|
|
|
Here is the flash portrait of:
|
|
```
|
|
pipegon! (60, 30, 40, inv (180), 0, 180)
|
|
pipegon! (60, 30, -40, inv (180), 0, 180)
|
|
```
|
|
|
|
##### FIGURE 15: Flash `pipegon!`
|
|
|
|
What happens if we make the radius of the roller negative?
|
|
Right.
|
|
The roller is inside the pipe.
|
|
Some examples are shown on the next page.
|
|
|
|
<!--
|
|
The part below will require more careful translation, at least/until we shift Ludus's turtle graphics to use an actor model, and thus be animated.
|
|
This is a key difference between Ludus and Logo.
|
|
-->
|
|
### Cosure
|
|
Have you noticed that even the most complex designs we have done so far are drawn quite quickly?
|
|
Each is complete by the time the roller has made a single 360-degree trip around the pipe.
|
|
If the roller makes a second trip around the pipe, the design repeats exactly.
|
|
We can describe this kind of design as one that has "closed upon itself" or, more briefly, that has "closed" after one trip.
|
|
Not all designs produced by our `pipegon!` machine will close after only one trip; some will take several trips to close, and others will require a great number of trips.
|
|
Experiments will show that altering the sizes of the roller and pipe leads to different closure patterns.
|
|
What determines the number of trips before closure occurs?
|
|
Can you calculate the trips until closure if you know the sizes of the roller and pipe?
|
|
Could you "find" a design that never closed?
|
|
|
|
### A portfolio of roller-inside-pipe portraits
|
|
|
|
##### FIGURES 16-19: Interior pipegons (no code given :|)
|
|
|
|
On the next page is a `pipegon!` design that closes only after a number of trips around the pipe.
|
|
The individual images show the design at various trip stagesaround the pipe.
|
|
Can you guess the pipe and roller sizes I used?
|
|
|
|
### Words elicit images
|
|
Words that are visually descriptive, like closure, should call up a variety of images in your mind.
|
|
This elicitation of mind-images can be enormously useful in visual modeling.
|
|
In each of the following exercises, I will stress the importance of words.
|
|
We must talk a lot in conjunction with sketching a lot.
|
|
Take a few minutes here to think visually about the word closure.
|
|
Say "closure": what images does it bring to mind?
|
|
Tell the turtle to "hurry up and bring a design to a close."
|
|
Jot down, or sketch, the image ideas elicited in your own mind by the chanting of the word.
|
|
Put it all in your notebook.
|
|
|
|
Suppose you needed to find a synonym for closure.
|
|
What would you suggest?
|
|
Any suggestion must be descriptive of all the image work we have completed.
|
|
By the way, you probably won't find closure in a standard dictionary.
|
|
Why is this?
|
|
|
|
### A slowly closing `pipegon!`
|
|
|
|
##### FIGURE 20.1-7: A slowly closing `pipegon!` (no code)
|
|
|
|
### Imaginary machines
|
|
At the start of this chapter I mentioned that sometimes we would model machines from the real world--pipes and rollers are very real world--and other times we would model machines that aren't so real.
|
|
Perhaps we can make one model do both real and imaginary things.
|
|
For example, can we make our `pipegon!` machine draw some fantastic designs?
|
|
(By the way, look at that word _imaginary_.
|
|
Why does it have _image_ in it?
|
|
Can you imagine why?)
|
|
Let's imagine a striped roller inside a pipe.
|
|
The procedure `pipegon!` will generate a composite picture of this roller as it travels around the inside of a pipe.
|
|
So far, this is just like the situations viewed above.
|
|
But now, let's introduce the _fantasy_ feature.
|
|
Make the radius of the roller larger than the radius of the pipe in which it "rolls." Is this possible?
|
|
Can it be done?
|
|
I asked `pipegon!` to do it, and the results are shown on the next page.
|
|
What is happening?
|
|
Are these pictures of real or imaginary machines?
|
|
How can you work out your answer?
|
|
Can you sketch it?
|
|
|
|
### Imaginary `pipegon!`s?
|
|
|
|
##### FIGURE 21.1-4: `pipegon!`s with larger rollers than pipes
|
|
|
|
### Recapitulalion
|
|
Let's summarize what has happened in the last few pages.
|
|
We have built a Logo model that can produce a large variety of images, some of them very surprising.
|
|
But more important, we have seen how the act of modeling can facilitate the visual exploration of some of the characteristics of a real-world machine.
|
|
Once we began to tinker with our model, we wanted to tinker further.
|
|
Some of our designs posed difficult questions whose answers were not at all obvious.
|
|
Closure was such a question.
|
|
We needed to do more tinkering and more experimenting to come to grips with what was going on.
|
|
|
|
Could we have predicted the directions this tinkering and experimentation would take before we started?
|
|
I don't think so.
|
|
Once we begin to model parts of our world, the act of modeling takes on a life of its own.
|
|
I think we have touched what Levi-Strauss said happens when one plays with miniatures.
|
|
Model play "gratifies the intelligence and gives rise to a sense of pleasure which can already be called aesthetic."
|
|
I hope you would also describe visual modeling as fun.
|
|
|
|
### Why pipes and rollers?
|
|
I started with this particular machine because I was interested in it.
|
|
I could have used any number of alternative illustrations, but this was my own direction.
|
|
I will show you, in the chapters to come, dozens of other examples that illustrate the ways in which visual modeling encourages the modeler to look at the world differently.
|
|
|
|
But please keep the following in mind.
|
|
All of the exercises are based on my own interests and the interests of my students.
|
|
However, the ordering of these exercises in this book is _not_ arbitrary.
|
|
I have carefully placed my exercises within specific chapters and I have ordered and introduced these chapters in a very structured fashion.
|
|
Recall that the subtitle of the book is _A structured approach to seeing_.
|
|
|
|
My intention is to show you, very precisely, one approach to visual modeling and graphics.
|
|
I hope that the usefulness of this will be so obvious you will be encouraged to find your own approach, through your own examples.
|
|
In effect, I want you to write an alternative to this book.
|
|
|
|
### People as scientists: the work of George Kelly
|
|
Having admitted that this book is a very personal document, let me go further by introducing to you the work of an American psychologist who has greatly influenced my own thinking about model builting.
|
|
George Kelly, born in Kansas in 1905, was trained in mathematics, physics, sociology, and psychology.
|
|
Kelly's claim to fame comes from his view that each person tries to make sense of his world using techniques that are similar to those used by scientists.
|
|
In fact, Kelly viewed all people as scientists.
|
|
|
|
"Man looks at his world through transparent patterns or templets which he creates and then attempts to fit over the realities of which the world is composed.
|
|
The fit is not always very good.
|
|
Yet without such patterns the world appears to be such an undifferentiated homogeneity that man is unable to make any sense of it.
|
|
Even a poor fit is more helpful than nothing at all."
|
|
|
|
Kelly gives the name _constructs_ to the patterns that people try on for size.
|
|
He could just as well have called these patterns _models_.
|
|
These constructs--or models--"are ways of construing the world.
|
|
They are what enables man, and the lower animals too, to chart a course of behavior, explicitly formulated or implicitly acted out, verbally expressed or utterly inarticulate, consisten with other courses of behavior or inconsistent with them, intellectually reasoned or vegetatively sensed."
|
|
|
|
Each person's scientist aspect encourages him to "improve his constructs by increasing his repertory, by altering them to provide better fits, and by subsuming them with subordinate constructs or systems."
|
|
For Kelly, human behavior is the application of scientific methodin making sense of a particular environment.
|
|
Rather than merely responding to surroundings, people use an experimental approach to test and extend their system of personal constructs.
|
|
Each person's goal, in Kelly's view, is to build explanatory models that effectively explain and predict personal environments.
|
|
|
|
Kelly suggested shortcuts for improving construct systems.
|
|
Kelly's shortcut was to encourage individuals to make their own constructs verbally explicit.
|
|
His most famous method for eliciting and verbalizing personal constructs is known as the repertory grid technique.
|
|
Using slightly different words, Kelly's techniques encouraged individuals to build verbal models of their own constructs.
|
|
Once built, these verbal models could be analyzed in much the same way as we have analyzed our pipe-and-roller model.
|
|
Tinkering with constructs would occur naturally, and this would encourage further tinkering.
|
|
And as a result of this play, construct models might become more general and more powerful.
|
|
|
|
Kelly worked with verbal rather than visual models, but many of his ideas can be extended to the latter.
|
|
My interest, as was Kelly's, is to suggest how to describe our inner models.
|
|
While Kelly was interested in the verbal description of models, I am interested in more graphical descriptions.
|
|
My goal is to encourage you to look at your own visual baggage.
|
|
Obviously, I need words, too, to help in my form of elicitation.
|
|
Sometimes, you may think that I rely on words too much.
|
|
Too much chat, you might say...
|
|
|
|
If you are intrigued by this very brief account of George Kelly's work, find his book _A Theory of Personality: the psychology of personal constructs_ (W.
|
|
W. Norton, New York, 1963).
|
|
All the Kelly quotes were taken from it.
|
|
|
|
### Exercises
|
|
#### Exercise 2.1
|
|
Can you come up with some rules about `pipegon!` closure?
|
|
Specifically, can you characterize a final pipegon image in terms of the dimensions of its parts?
|
|
Experiment a bit.
|
|
Try to make some generalizations.
|
|
Do the generalizations hold up after more experimenting?
|
|
Whether you feel successful in this activity or not, find the following book in your local library: E. H. Lockwood, _A Book of Curves_ (Cambridge University Press, Cambridge, 1963).
|
|
|
|
This book may help you think about closure.
|
|
It may also suggest other image ideas to think about visually.
|
|
Don't worry too much about the book's math.
|
|
Look at the diagrams, and read the chapter names.
|
|
Listen to these chapters: cardioids, limaçons, astroids, right strophoids, tractrices, roulettes, and glissettes.
|
|
What images do these names dredge up?
|
|
Sketch them before you find the book.
|
|
|
|
#### Exercise 2.2
|
|
How do you feel about carnivals and amusement parks?
|
|
Do you enjoy their mechanical rides?
|
|
I'm not talking about tame rides, like the merry-go-round or carousel, but wild rides that yank the rider through space.
|
|
On the next page is a sketch of a machine that gave me a dose of healthy terror.
|
|
Suppose that we are watching this machine from a safe distance.
|
|
A brave friend is sitting inside it and pointing a very bright flashlight at us.
|
|
What pattern will this light trace out as the machine grinds into life?
|
|
The pulls and pushes on the rider of this machine change suddenly and unexpectedly.
|
|
Can you make a picture of this?
|
|
Can you describe visually why this kind of machine is so scary?
|
|
|
|
##### FIGURE 22: A scary amusement ride
|
|
|
|
Design some _imaginary_ carnival rides and give your machines imaginative names.
|
|
Draw big sketches of your ideas; draw them large enough so that others can "read" them.
|
|
Describe the ride in words so that potential travelers will know what to expect _before_ they climb aboard.
|
|
You had better show them some pictures of the trip as well.
|
|
Why not use Logo to generate these scenes?
|
|
|
|
#### Exercise 2.4
|
|
Do you know the term "kinetic sculpture"? If not, you can guess what they are, or rather what they do?
|
|
Kinetic sculptures are mechanical or electronic sculpture-machines that move, clank, or flash.
|
|
Some even squirt water (for example, the wonderful kinetic fountain designed by Nikki de Saint-Phalle and Jean Tinguely opposite the Pompidou Center in Paris).
|
|
Carnival rides are a special class of kinetic sculptures.
|
|
They may not seem suitable for art gallery installation, but I have seen films of amusement park rides included in exhibitions.
|
|
The French sculptor Jean Tinguely does kinetic sculpture on a more modest scale.
|
|
Below is a reproduction of his "Homage a Marcel Duchamp," done in 1960.
|
|
It is human scale, about 5 feet high.
|
|
Design and build a kinetic sculpture using Logo.
|
|
You might start by trying to model the Tinguely machine.
|
|
`pipegon!`s are a kind of kinetic sculpture, too.
|