Saturday, 13 April 2013

Science Poetry

Einstein and the Photon

Einstein and the Photon "Wave or particle?" is the question.
It gives Albert indigestion:
      Photon is a fickle tickler.
Albert pleads, "Which do you favor?
Dearest Photon, do not waver;
      Choose ballistic or vermicular!"
Photon says, elucidating,
"Please don't think I'm vacillating
      When I say I'm not particler!"
-- Keith Enevoldsen, 2003

Rock Scissors Paper Two-in-One Logic Project

This project is really two projects. You build your own Rock Scissors Paper game in two different ways: (1) as an electric circuit board game, and/or (2) as a computer game. You can do either or both. If you do both you can compare your electric circuit logic to your computer program logic.
Rules of the game: Two players simultaneously choose either rock, scissors, or paper. The winner: scissors cut paper, paper wraps rock, rock smashes scissors.

Rock Scissors Paper
Electric Circuit Logic Project

How to play: Players A and B will simultaneously press their Rock, Scissors, or Paper buttons, and a lamp will indicate the winner.
Supplies you will need: A board, twelve switches (push-button spring-return normally-off micro-switches), two lamps (small bulbs or LEDs, and lamp sockets), batteries (and battery holders), wire, wire connectors, screws, tape, drill, screwdriver. Use twelve single-pole switches rather than six double-pole switches because that better demonstates how the circuit works.
 
How to make it: Mount everything on the board. If you want it to be pretty, put the lights and switches on the front and the wires and batteries on the back. Here's a partial circuit diagram. Before looking at the complete circuit diagram, see if you can figure out where the other wires go.
 
Rock Scissors Paper Circuit Diagram - Partial
Here's the complete circuit diagram.
Rock Scissors Paper Circuit Diagram
How it works: Each player has three ways to win. Player A's three ways to win are built from three circuits (blue), each of which has two switches, one for each player's choice, wired in series. The three series circuits representing the three ways for player A to win are wired in parallel to light up player A's lamp. Similarly for player B (red).
Teacher's note: Depending on the age of the students, you should let them figure out as much as they are able by themselves. Don't show them the complete circuit diagram. You may want to print the partial circuit diagram and draw in a few more wires.
 

Rock Scissors Paper
Computer Program Logic Project

How to play: This is a non-graphical command-line game. The program will ask player A to enter "r" (rock), "s" (scissors), or "p" (paper) (without letting player B see), then it will ask player B to enter "r", "s", or "p". The program will figure out who won.
Supplies you will need: A computer and the programming language software of your choice.
 
Here's the partial program in pseudo-code (not a real programming language). Before looking at the complete program, see if you can figure out the logic to decide who wins. Use the boolean logic operators "AND" and "OR" with nested parentheses.
 
 write "Rock Scissors Paper Game"
 loop forever
 {
  write "Player A, enter r, s, or p: "
  read a (see note 1)
  write "Player B, enter r, s, or p: "
  read b
  write "A chose: " + a
  write "B chose: " + b
  if (...you figure out what goes here...)
  {
   write "A wins"
  }
  else if (...you figure out what goes here...)
  {
   write "B wins"
  }
  else
  {
   write "nobody wins"
  }
 }
Note 1: You don't want player B to see what player A has typed, so you should (1) read without echoing what is typed, or (2) clear the screen after player A has typed, or (3) use a popup prompt box that goes away after player A has typed.
 
Here's the complete program in pseudo-code.
 
 write "Rock Scissors Paper Game"
 loop forever
 {
  write "Player A, enter r, s, or p: "
  read a (see note 1)
  write "Player B, enter r, s, or p: "
  read b
  write "A chose: " + a
  write "B chose: " + b
  if ((a="r" and b="s") or (a="s" and b="p") or (a="p" and b="r"))
  {
   write "A wins"
  }
  else if ((b="r" and a="s") or (b="s" and a="p") or (b="p" and a="r"))
  {
   write "B wins"
  }
  else
  {
   write "nobody wins"
  }
 }

Comparison of the Two Projects

Comparing the electric circuit to the computer program, notice how the series circuits correspond to the "AND" operators, and the parallel circuits correspond to the "OR" operators.

Twelve-Tone Musical Scale

Why does our musical scale have twelve notes (counting both the white and black keys on the piano)? Why not ten or fifteen or twenty?
To answer this question, we first need some background information. A note's pitch or frequency is measured in cycles per second; for example, A' is 440 cycles per second. The distance between two notes, measured as the ratio of their pitches, is called an interval. If the interval between two notes is a ratio of small integers, such as 2/1, 3/2, or 4/3, they sound good together — they are consonant rather than dissonant. People prefer musical scales that have many consonant intervals.
There is no absolutely definitive list of consonant intervals because the concept of consonance involves subjective aesthetic judgment. However, the following seven pure intervals, smaller than or equal to an octave (2/1) and larger than unison (1/1), are commonly considered to be consonant.
Basic Consonant Intervals
2/1 octave harmonic inverse of 1/1
3/2 perfect fifth harmonic inverse of 4/3
4/3 perfect fourth harmonic inverse of 3/2
5/3 major sixth harmonic inverse of 6/5
5/4 major third harmonic inverse of 8/5
6/5 minor third harmonic inverse of 5/3
8/5 minor sixth harmonic inverse of 5/4
This list can be constructed mathematically by listing the ratios of the smallest integers and including their harmonic inverses (defined below). First, list the ratios of the integers from 1 to 5, where the ratios are between 1 (unison) and 2 (octave): 1/1, 2/1, 3/2, 4/3, 5/3, and 5/4. Then, include their harmonic inverses [shown in brackets]: 1/1 [2/1], 2/1 [1/1], 3/2 [4/3], 4/3 [3/2], 5/3 [6/5], and 5/4 [8/5]. Remove the duplicates. We can ignore the trivial unison interval. This leaves: 2/1, 3/2, 4/3, 5/3, 5/4, 6/5, and 8/5. If you start with the integers from 1 to 3 or 1 to 4, the result is the top three intervals: 2/1, 3/2, and 4/3. If you start with the integers from 1 to 5 or 1 to 6, the result is this list of seven intervals.
Harmonic inverses: Two intervals are harmonic inverses of each other if they combine to make an octave, in other words, if the ratios multiplied together equals two — for example, 3/2 x 4/3 = 2. Harmonic inverses appear spontaneously when you construct a new musical scale. Imagine making a musical instrument with three strings. Start with two strings making an octave, a low string and a high string with half the length and twice the pitch. Now, add a string somewhere in the middle, for example, 2/3 the length and 3/2 the pitch of the low string. Playing the low and middle strings together makes a 3/2 interval (perfect fifth), and playing the middle and high strings together makes another interval, the harmonic inverse of 3/2, which is 2/(3/2) = 4/3 (perfect fourth). Each time you add a string between the low and high strings (the octave), you always get two intervals that are harmonic inverses.
In the past, people constructed scales based on pure or natural ratios of small integers. For example, the just intonation system uses the exact ratios shown in the table below. However, this method runs into serious problems. Although some of the intervals are perfect, other combinations of notes sound very bad ("wolf intervals"). After the Middle Ages in Europe, music became more complex, with more polyphony and more key changes, and these bad intervals became more common.
The modern equal temperament system was invented (in the 1500s) to solve this problem. (Galileo's father, a music theorist, was one early proponent of equal temperament.) The octave is divided into twelve exactly equal intervals. In this system, the smallest interval, the semitone, is not a simple integer ratio, but is the twelfth root of two (21/12) or approximately 1.059. Larger intervals are powers of the twelfth root of two, as shown in the table below. Although no interval (except the octave) is perfect in this system, the error is "spread around" evenly so there are no very bad intervals.
The table below compares just intonation with equal temperament. The intervals in both systems are never exactly the same (except the octave), but they are very close — always within about one percent or better. For example, the fifth (3/2), obtained by multiplying the twelfth root of two by itself seven times, is 1.498 — very nearly a perfect 1.500. The fourth (4/3), obtained by multiplying the twelfth root of two by itself five times, is 1.335 — very nearly a perfect 1.333.
Number of
Semitones
Interval
Name
Notes Consonant? Just
Intonation*
Equal
Temperament
Difference
0 unison C-C Yes 1/1=1.000 20/12=1.000 0.0%
1 semitone C-C# No 16/15=1.067 21/12=1.059 0.7%
2 whole tone C-D No 9/8=1.125 22/12=1.122 0.2%
3 minor third C-Eb Yes 6/5=1.200 23/12=1.189 0.9%
4 major third C-E Yes 5/4=1.250 24/12=1.260 0.8%
5 perfect fourth C-F Yes 4/3=1.333 25/12=1.335 0.1%
6 tritone C-F# No 7/5=1.400 26/12=1.414 1.0%
7 perfect fifth C-G Yes 3/2=1.500 27/12=1.498 0.1%
8 minor sixth C-Ab Yes 8/5=1.600 28/12=1.587 0.8%
9 major sixth C-A Yes 5/3=1.667 29/12=1.682 0.9%
10 minor seventh C-Bb No 9/5=1.800 210/12=1.782 1.0%
11 major seventh C-B No 15/8=1.875 211/12=1.888 0.7%
12 octave C-C' Yes 2/1=2.000 212/12=2.000 0.0%
* This table shows one variation of just intonation.
So, back to the original question: Why does our scale have twelve notes? We have explained that an equal-tempered scale works better in practice than a scale based on pure intervals, but we have not yet explained why we prefer the twelve-tone equal-tempered scale. Why do we not use a ten-tone or twenty-tone equal-tempered scale? Is there something special about twelve?
The answer is: Yes, the twelve-tone equal-tempered scale is remarkable. The nearly perfect intervals seen in the table above are not typical of other equal-tempered scales. Consider the seven basic consonant intervals (described above): 2/1, 3/2, 4/3, 5/3, 5/4, 6/5, and 8/5. We observe:
The twelve-tone equal-tempered scale is the smallest equal-tempered scale that contains all seven of the basic consonant intervals to a good approximation — within one percent.
Furthermore, for the most important intervals, the fifth (3/2) and fourth (4/3), the approximations are better — within about one tenth of one percent.
Let's compare the twelve-tone equal-tempered scale to some other equal-tempered scales.
  • All equal-tempered scales with 14 notes or fewer, except the twelve-tone equal-tempered scale, contain at most only three of the seven basic intervals (including the octave) within one percent.
  • Several equal-tempered scales with between 15 and 30 notes (notably the 19-tone and 24-tone scales) contain all seven basic intervals, but in none of these scales are the intervals more nearly pure than in the twelve-tone equal-tempered scale.
  • The 31-tone equal-tempered scale has all seven basic intervals to a good approximation, some with better accuracy than the twelve-tone scale, but the most important fifth (3/2) interval is less accurate than in the twelve-tone scale (218/31=1.495).
  • The 41-tone equal-tempered scale is the first with a better fifth (3/2) interval than the twelve-tone scale (224/41=1.5004).
  • The 53-tone equal-tempered scale has all seven basic intervals with a better accuracy than the twelve-tone scale (the fifth is 231/53=1.49994).
But bigger is not necessarily better. Although scales with many tones have many nearly pure intervals that are consonant (ratios of small integers), they have even more intervals that are dissonant (not ratios of small integers). In contrast, the small twelve-tone equal-tempered scale has more consonant intervals (seven) than dissonant intervals (five). We observe:
The twelve-tone equal-tempered scale is the only equal-tempered scale that contains all seven of the basic consonant intervals to a good approximation — within one percent — and contains more consonant intervals than dissonant intervals.
Also, scales with many tones are too large to be really practical: a keyboard with the same range as a piano would be huge.
In summary, the twelve-tone equal-tempered scale is probably the best compromise of all possible scales, and that is why it is now standard in the Western world and common all over the world.

Which equal-tempered scales, other than the twelve-tone scale, are most widely used? We are including here only equal-spaced or roughly equal-spaced scales, not unequal-spaced scales such as the common pentatonic scales (black keys) and heptatonic scales (white keys).
  • Roughly equal-spaced 5-tone and 7-tone scales are found in several musical traditions. The Indonesian gamelan slendro scale is a roughly equal-spaced 5-tone scale.
  • The 6-tone (whole-tone) equal-tempered scale is sometimes used in Western music, as in the impressionistic music of Debussy.
  • The 19-tone equal-tempered scale has been used by some Western musicians since the Renaissance.
  • Indian music uses a subset of a roughly equal-spaced 22-tone (22 shruti) scale.
  • Arabic and other Middle Eastern music uses a subset of a roughly equal-spaced 24-tone (quarter-tone) equal-tempered scale. The quarter-tone scale has been used by some Western musicians (Boulez, Ives).
  • The 31-tone equal-tempered scale has been used by some Western musicians since the Renaissance, especially in the Netherlands (due to Huygens).

The Equal Temperament Musical Scales Worksheet (MS Excel spreadsheet or PDF document) shows all the ET scales (up to 100 tones) and shows how well they match the "ideal" intervals. If you don't agree with my ideal intervals, the spreadsheet allows you to enter your own ideal intervals. If you don't agree with my scoring, you can change the score function, if you know basic programming.
ETScales
Note: My mathematical results showing the specialness of the twelve-tone scale are fairly robust. When I perform the same analysis with small variations of the discretionary inputs, the twelve-tone scale still looks remarkable. For example, if I add or remove a few intervals near the end of my list of consonant intervals, the results are similar. Also, if I increase the matching tolerance from 1% to 2% or reduce it to 0.8%, the results are similar. You can try your own variations with the spreadsheet above.

Flexagons

Flexagons are folded paper constructions that are fun to flex to reveal hidden pictures.
Tetraflexagons are square. The simplest is the tritetraflexagon, which has three square faces. Hexaflexagons are hexagonal. The simplest is the trihexaflexagon, which has three hexagonal faces. A hexahexaflexagon has six hexagonal faces. The faces appear in different orientations. It is fun to flex a flexagon and try to find all faces in all possible orientations.
Here's a pretty Hexahexaflexagon Pattern (PDF) that I created. The document contains:
  • Instructions for making and flexing a hexahexaflexagon.
  • A blank hexahexaflexagon pattern. Decorate your own hexahexaflexagon.
  • A decorated hexahexaflexagon pattern with six faces: flowers, leaves, snowflakes, faces, planets, and birds. The decorations are designed to make it easy to identify the six faces and their different orientations.
You can learn a lot more about flexagons at other websites.

Kinegrams

What is a Kinegram?

A kinegram (pronounced "KIN-uh-gram") is a moving picture you can make with paper and plastic. The word comes from "kine-" meaning "moving" and "-gram" meaning "drawing".
A kinegram has two parts: (1) an underlying picture with a complicated striped pattern and (2) an overlay of alternating clear and solid stripes on a sheet of clear plastic. When the overlay is moved up and down in front of the picture, you will see the motion, such as wheels turning or circles expanding and contracting.
Wheel
without overlay
Wheel
with overlay
Rings
without overlay
Rings
with overlay
The kinegrams found on toys use a "lenticular sheet" or "lenticular screen" instead of a striped overlay. This is a clear plastic sheet with parallel rounded ridges that act like lenses. The ridges are aligned horizontally and the motion effect is produced by tilting the kinegram back and forth. (Lenticular sheets can also be used for 3-D images, with the ridges are aligned vertically so each eye sees a different image.)
Kinegrams are related to Moiré (pronounced "MWA-ray") patterns, which are the patterns you see when look through two window screens.
You can view these kinegrams using paper and plastic, or using the computer.

How to Make the Picture Move with Paper and Plastic,
Without a Computer!

The cool thing about kinegrams is that the picture moves using just a sheet of paper and a sheet of plastic, without a computer!
Step 1: Print the kinegrams on paper. Here are several kinegrams in printable Adobe Acrobat PDF files.
Step 2: Print the striped overlay pattern on a sheet of clear plastic. You can get printable clear plastic at an office supply store. If you cannot print directly onto clear plastic, then you can print the overlay on paper and then photocopy it onto clear plastic. Here are several printable overlays in Adobe Acrobat PDF files. The thickness of the clear stripes are different, but the overall spacing is the same, so all these overlays will work on all these kinegrams. Thinner clear stripes will make the kinegram appear sharper but dimmer; whereas thicker clear stripes will make the kinegram appear brighter but blurrier.
Step 3: Move the overlay slowly up and down in front of the kinegram and you should see the motion, such as wheels turning, etc. The overlay must be lined up precisely with the kinegram. It is helpful to make a sleeve of folded paper to keep the overlay straight.
Important Info about Printing Scale: The overlay must be printed at the exact same print size scale as the underlying kinegrams. It is best to print the Adobe Acrobat PDF files provided here, rather than printing the GIF or PNG images from the web page, because you can better control the print size scale. Print the PDF files at 100% scale if possible. If you reduce or enlarge anything, then you must reduce or enlarge all the kinegrams and the overlay by the exact same percentage. To help you check the scale of your printouts, most of the kinegrams on these pages have alignment marks (tiny blue dots on the left and right sides) that should exactly match the overlay spacing.

How to Make the Picture Move on the Computer Screen

Drag the striped overlay slowly over the pictures to make them move.
Click the buttons to show the overlay and adjust its appearance.
  • Click the "Show" button to fetch the overlay and make it visible.
  • Click the "Hide" button to make it invisible.
  • Click the black, gray, or white buttons to change the overlay color.
  • Click the size buttons to change the size of the clear stripes. You can select 50%, 33%, 16%, or 8% clear. Select larger clear stripes for a brighter image; select smaller clear stripes for a sharper image.
When you first load this page, the draggable striped overlay is initially hidden. If you have a slow connection, you may need to wait for all images on the page to finish loading before you can use the overlay. Reload the page to return the overlay to its initial state. This draggable overlay uses executable JavaScript (JQuery). You may need to tell your browser to allow JavaScript to run. If it still does not work, try a different web browser if you have one.

Sample Kinegram

When the striped overlay is moved up and down in front of this kinegram, the wheels of the car will turn, the road will move horizontally, and the sun will pulse in or out.
Car with rotating wheels.


 
   
       

More Kinegrams

You can see more kinegrams here:

Making Your Own Cut-and-Paste Kinegram Scenes

You can make your own kinegram scenes including funny faces, vehicles, abstract patterns, etc. by printing the kinegram patterns on paper and cutting and pasting them into a big picture, like a collage. It's fun to make your own cut-and-paste kinegram birthday cards or other holiday cards. You can do the cutting and pasting literally with paper, scissors, and glue, or you can do it on the computer in your favorite drawing/painting application.
Most of the kinegram patterns on these pages have a preferred horizontal direction, which must match the horizontal stripes of the overlay. If you are using scissors and glue (not a computer) to combine pictures, then be careful to line up the pieces exactly. Do not change the size of the kinegrams or the overlay. If you reduce or enlarge anything, then you must reduce or enlarge all the kinegrams and the overlay by the exact same percentage. Do not rotate the pieces. You may mirror the pieces. You may change the colors.

More Info

For more info about this kind of animation, search the web for "kinegram", "scanimation", "lenticular sheet", "lenticular screen", or "lenticular lens".
You can make your own new kinegram animations if you are a skillful user of a computer drawing or painting application. There are detailed instructions here: Making Kinegram Animations.
Terms of Use: These kinegrams are free for your use. The kinegrams were made by Keith Enevoldsen and are released to the public domain.

Ambigrams

Ambigrams, also called inversions, are designs in which you can see different words, or the same word in different ways, depending on how you look at them. I created all the ambigrams on these pages, except where credited otherwise.

Happy Birthday
Happy Birthday: Same upside-down.
Happy Holiday
Happy Holiday: Same upside-down.
up / dn
up / down: Same upside-down. This is simple, but I like it.

Four-Way Ambigrams

These ambigrams can be viewed in FOUR different ways! These are much more complicated than two-way ambigrams.
Other people have also tackled four-way ambigrams. Kevin Pease has created wonderful four-way ambigrams of Earth/Air/Water/Fire and Winter/Spring/Summer/Autumn.

Name Ambigrams — Family and Friends

Here are some ambigrams of the names of my family and friends.

Ambigram Links

There are many ambigrams on the web. Just search for "ambigram". Here are a few links to get you started.

Symmetry Fun

Symmetrical Funny Faces

Each of these faces are made from two copies of the same design. The repeated design is either resized, rotated, or shifted to make the face. Try creating your own symmetrical funny faces.