contents explore MicroWorlds math crafts art gallery attic grownup cats

Math = Art! Logo 15-word challenge winners
other entries

The challenge was announced and judged by Keith Enevoldsen, spring 1997:

"Write a Logo one-liner using 15 or fewer words, not counting square brackets and parentheses, to produce the most beautiful, complex, and interesting picture."

The one-line codes work as written in MSWLogo and UCBLogo. MicroWorlds sometimes requires slightly different code, as noted below in the Winners' section, and cannot run code using the command "px" (which reverses the color).

Click here for information on downloading free versions of Logo.

The Grand Prize (the Golden Turtle)


Five Rose or Starfish, by , Italy (and , Australia) - only 8 words!!

repeat 1800 [fd 10 rt repcount + .1]
dotimes [i 1800] [fd 10 rt :i + .1] (MicroWorlds)

Please see the project details for the project background, extra code, and more graphics.


The "Pure Logo" Prize


Dahlia, by , U.S. (14 words)

repeat 8 [rt 45 repeat 6 [repeat 90 [fd 2 rt 2] rt 90]]

The 6 can be replaced with 1 to 7 for other flowers.
For numbers greater than 7, the patterns repeat.
This will work without modification in absolutely all Logo implementations.


The "Complexity" Prize


Layers, by Alessio Plebe, Italy (15 words)

for [i 0 420] [seth :i repeat :i [fd 2 rt 1] pu home pd]
dotimes [i 420] [seth :i repeat :i [fd 2 rt 1] pu home pd] (MicroWorlds)

This is slow, but it has very beautiful and complex moire patterns. If your screen is small, let it wrap. The moire effect isn't as strong if you try to shrink it.


The "Classic Math" Prize

Lissajous variations, by Samuel Kilchenmann, Switzerland (15 words)

repeat 360 [setxy (sin(2 * repcount)) * 150 (sin(3 * repcount)) * 150]
repeat 360 [setxy (sin(89 * repcount)) * 150 (sin(179 * repcount)) * 150]
repeat 360 [setxy (sin(254 * repcount)) * 150 (sin(201 * repcount)) * 150]
repeat 360 [setxy (sin(327 * repcount)) * 150 (sin(66 * repcount)) * 150]

dotimes [i 360] [setpos list (sin(254 * :i)) * 150 (sin(201 * :i)) * 150] (MicroWorlds)

Change the factors to get lots of different designs.


The "Random" Prize


Pencil Sketch, by Andrzej Baczynski (shortened by Yehuda Katz), 15 words

repeat 5000 [run list item sum 1 random 4 [fd bk rt lt] random 10]

This looks remarkably like a person is sketching with a pencil. It looks even more like a pencil sketch if you use PENREVERSE (PX) mode.


The "Polygon" Prize


Penta-octagon, by M.H. Elhefni, Egypt (15 words)

for [l 10 80 5] [repeat 5 [repeat 8 [fd :l rt 45] rt 72]
dotimes [i 15] [repeat 5 [repeat 8 [fd (10 + (:i * 5)) rt 45] rt 72] (MicroWorlds)

Beautiful "telescoping" polygons. Change the numbers to get more designs.
(See the "octa-octagon" below.)


The "Animation" Prize


Circus (Ring variation 2), by Olga Tuzova, Russia (14 words)

[The object above spins around and around. This screenshot shows one instant of the animation.]

px setpensize [100 100] repeat 1000 [repeat 72 [fd 20 rt 10] rt 90]

This requires PENREVERSE (PX) and a big pen.
This cheerful entry reminds me of circus jugglers and clowns doing cartwheels.

other ring variations


The "Subtle Effects" Prize


Radar, by Zippi Katz, Israel (11 words)

px repeat 1000000 [fd 40 fd 40 bk 80 rt 1]

This requires PENREVERSE (PX).
It looks like a weather radar. [It is in constant motion.]
The really interesting part is that the effect is entirely destroyed
if you replace "fd 40 fd 40" by "fd 80".


The "Surprise" Prize


Square Spiral, by Yehuda Katz, Israel (9 words)

px for [x 1 1000000] [fd :x rt 90]

This requires PENREVERSE (PX).

It seems simple, but it has a suprising effect, based on WRAP mode and PX mode. The effect will depend on your screen size. The effect is strikingly bold with a square screen and more complex with a non-square screen. In MSW Logo, you can set the screen size.

Example: c:\\logo\\logo -h 480 -w 640


Index of Other Contest Entries
slalom scrolls rose variations low growing
hairy star lissajous sun Don Quixote
jaggy star times hexagon variations ellipse
bullring shell pentahexagons polygon variations
random lines hypercube pentagon rotating circle
square spiral variations scribble moire disappearing triangles
sine wave fan flower fireworks smiling fish
radar variations current peltonwheel bird's wings
brownian motion elliptical spiral spirals butterfly
feathers tree growth rings gilly flower fish
spiral cloudy night growing scrolls block
ring variations simple flower mountains octastar spiral
cubism clock head pentastar spiral
Milky Way self-replicating eye designs
inky dots spinning wheels

Note: The first four "entries" shown here were among some samples provided by Keith Enevoldsen in announcing the Logo 15-word challenge.


Slalom Scrolls

for [i 0 2000] [fd 5 rt (90 * sin :i)]

index



Hairy Star

for [i 0 4700] [fd 10 rt (180 * sin (:i * :i))]

index



Jaggy Star

for [i 0 2200] [fd (25 * sin :i) rt (:i * :i)]

index



Bullring

for [i 0 1002] [fd 8 seth (360 * (power :i 3) / 1002)]

REFERENCES
"Another Fine Math You've Got Me Into..." by Ian Stewart contains an interesting chapter about curves like these. The "bullring" is from Ian Stewart's book.

index



Random Lines, by , U.S. (9 words)

repeat random 1000 [fd random 1000 rt random 360]

(This usually produces Jackson Pollacks, but there is a chance that it will produce a Michelangelo.) Depending on what random numbers the computer chooses, you may get something like one of the three images above.

index



Square Spiral variation 1, by
Keith Enevoldsen, U.S. (9 words)
saved in early stage

px for[x 1 1000000] [fd :x rt 89.99]


Square Spiral variation 2, by Bill Kerr, Australia (14 words or 8 words)

make "x 1 repeat 150 [fd :x rt 89 make "x :x + 1]
for [x 1 150] [fd :x rt 89]

index



Sine Wave, by
Shachar Katz, Israel (15 words)

sety 1000 home setx 1000 for [x -180 180] [setxy :x 70 * sin :x]

index



Radar variation 1, by
Bill Kerr, Australia (12 words)

repeat 3600 [px fd 80 fd 0 bk 80 lt random 360]


Radar variation 2, by Keith Enevoldsen, U.S. (7 words)

px repeat 10000 [fd 200 rt 179]

index



Brownian Motion, by
Erez Katz, Israel (14 words)

repeat 10000 [fd 3 * (-1 + random 2) rt 90 * random 4]

(Maybe it should be named urban sprawl.)

index



Feathers, by , U.S. (13 words)

repeat 12 [repeat random 50 [fd 100 bk 95 rt 2] rt 180]


Feathers variation 1, by
Keith Enevoldsen, U.S. (13 words)

repeat 50 [repeat random 100 [fd 300 bk 295 rt 2] rt 180]

index



Spiral, by
Olga Tuzova, Russia (11 words)

reset for [i 0.01 4 0.05] [repeat 180 [fd :i rt 1]]

index



Ring, by
Olga Tuzova, Russia (10 words)

px setpensize [20 20] repeat 100000 [fd 2 rt 2]

(Looks like a caterpillar in motion.)


Ring variation 1, by Keith Enevoldsen, U.S. (10 words)

px setpensize [200 200] repeat 36 [fd 20 rt 10]

index



Cubism (Ring variation 3), by
Yehuda Katz, Israel (15 words)

px for [x 10 200] [setpensize se :x :x repeat 36 [fd 20 rt 15]]

index



Milky Way, by
Olga Tuzova, Russia (15 words)

setsc [0 0 0] px setpensize [10 10] repeat 100000 [fd 10 rt random 360]

index



Inky Dots, by
Olga Tuzova, Russia (14 words)

setpensize [10 10] repeat 10000 [pu fd 15 pd fd 0 rt random 360]


Inky Dots variation 1, by Yehuda Katz, Israel (15 words)

px setpensize [10 10] repeat 10000 [pu fd 15 pd fd 0 rt random 360]

index



Rose, by M.H. Elhefni, Egypt (shortened by
Yehuda Katz, Israel, 13 words)

for [t 0 180 3] [seth :t fd 200 * sin :t home]


Rose variation 1, by Keith Enevoldsen, U.S. (14 words)

for [t 0 180] [seth :t fd 200 * sin :t*7 home]


Rose variation 2, by M.H. Elhefni, Egypt (13 words)

repeat 9 [for [i 10 200 10] [fd :i bk :i rt 2]]

index



Lissajous, by M.H. Elhefni, Egypt (15 words)

for [t 0 360] [setxy 200 * sin :t 200 * cos :t * 5]

index



Times, by
Yehuda Katz, Israel (14 words)

for [i 1 10] [repeat 10 [type form repcount * :i 4 0] pr[]]

(This one uses the text screen.)
index



Shell, by
Vered Katz, Israel (14 words)

for [scr .2 1.75 .05] [setscrunch 1 :scr repeat 360 [fd :scr rt 1]]

index



Hypercube, by
Frank Caggiano, U.S. (12 words)

repeat 8 [repeat 4 [rt 90 fd 100] bk 100 lt 45]

index



Scribble, by
Keith Enevoldsen, U.S. (15 words)

repeat 1000 [fd 3 rt random int 20 * (1 + sin (10 * repcount))]

index



Fan Flower, by
Keith Enevoldsen, U.S. (12 words)

repeat 12 [repeat 75 [fd 100 bk 100 rt 2] fd 250]

index



Current, by
George Mills, U.S. (10 words)

repeat 5100 [fd 10 rt arctan (remainder repcount 100) / 100]

index



Elliptical Spiral, by
George Mills, U.S. (15 words)

reset repeat 3600 [setxy repcount / 10 * sin repcount repcount/20 * cos repcount]

index



Tree Growth Rings, by
George Mills, U.S. (13 words)

repeat 36000 [setxy (sqrt repcount) * sin repcount (sqrt repcount) * cos repcount]

index



Cloudy Night, by
George Mills, U.S. (8 words)

repeat 6000 [fd repcount rt remainder repcount 360]

index



Simple Flower, by , Australia (13 words)

repeat 11 [for [i 0 359] [fd 1 rt (sin :i / 2)]]

(Why does the line match up exactly after drawing 11 petals?)

index



Seconds, by
Zippi Katz, Israel (15 words)

px st setpensize [5 5] repeat 1000 [fd 100 wait 40 bk 100 rt 6]

(Clever use of the triangular turtle. The second hand continually moves as it is drawn, erased, and repositioned.)

Face, by Yehuda Katz, Israel (15 words)

pu rt 30 repeat 12 [fd 110 pd label repcount pu bk 110 rt 30]

(Try this: first run Face, then, without clearing the screen, run Seconds.)

index


Self-Replicating, by Brian Harvey, U.S. (13 words)

invoke [[x] print (list "invoke :x :x)] [[x] print (list "invoke :x :x)]

(This non-graphics one-liner prints itself.)

index



Basic Spinning Wheel variations 1-3, by Greg Simkins' 6th grade class, U.S. (15 words)

define "spin [[ ][repeat 15 [fd 100 bk 100 rt 5]]] repeat 25 [spin fd 100]
define "spin [[ ][repeat 15 [fd 100 bk 95 rt 10]]] repeat 12 [spin fd 100]
pu setpos [-400 0] pd
define "spin [[ ][repeat 25 [fd 100 bk 100 rt 15]]] repeat 24 [spin fd 100]

Basic Spinning Wheel variations 1-3, shortened by Yehuda Katz, Israel (12 words)

repeat 25 [repeat 15 [fd 100 bk 100 rt 5] fd 100]
repeat 12 [repeat 15 [fd 100 bk 95 rt 10] fd 100]
pu setpos [-400 0] pd
repeat 24 [repeat 25 [fd 100 bk 100 rt 15] fd 100]

index



Low, by Alessio Plebe, Italy (15 words)

pu setx -100 pd
for [i 0 32] [repeat :i [fd :i rt 358 / :i] bk sqrt :i]

index



Sun, by Alessio Plebe, Italy (13 words)

repeat 2000 [pu home seth random 361 fd 40 pd fd random 200]

index



Hexagon, by M.H. Elhefni, Egypt (15 words)

for [i 100 30 -50] [repeat 6 [repeat 6 [fd :i lt 60] lt 60]]

(Quasi-fractal.)


Hexagon variation 1, by
Yehuda Katz, Israel (15 words)

for [size 20 80 20] [repeat 6 [repeat 6 [fd :size rt 60] rt 60]]


Hexagon variation 2, by M.H. Elhefni, Egypt (15 words)

for [i 100 10 -5] [repeat 6 [repeat 6 [fd :i lt 60] lt 60]]

index



Pentahexagon, by M.H. Elhefni, Egypt (shortened by
Keith Enevoldsen, U.S.) (10 words)

repeat 5 [repeat 6 [fd 100 lt 72] lt 144]


Pentahexagon variation 1, by M.H. Elhefni, Egypt (15 words)

for [i 100 10 -5] [repeat 5 [repeat 6 [fd :i lt 72] lt 144]]

index



Pentagon, by M.H. Elhefni, Egypt (15 words)

for [i 100 10 -10] [repeat 5 [repeat 5 [fd :i lt 72] lt 72]]

index



Moire, by
Yehuda Katz, Israel (9 words)

window repeat 180 [fd 500 bk 500 rt 2]

index



Fireworks, by M.H. Elhefni, Egypt (14 words)

for [i 0 220 0.0001*sin :i] [fd :i bk :i rt 10]

index



Peltonwheel, by M.H. Elhefni, Egypt (14 words)

for [i 0 220 sin :i/1000] [fd :i bk :i rt 51]

index



Spirals, by M.H. Elhefni, Egypt (14 words)

for [i 0 220 sin :i/1000] [fd :i bk :i rt 41]

index



Gillyflower, by Alessio Plebe, Italy (15 words)

repeat 450 [make "a 73 * sin repcount fd :a rt 88 * cos :a]

index



Growing Scrolls variation 1, by
Keith Enevoldsen, U.S. (12 words)

for [i -1 4] [repeat 720 [fd power 2 :i rt repcount]]


Growing Scrolls variation 2, by Keith Enevoldsen, U.S. (14 words)

for [i -1 15] [repeat 720 [fd power 1.2 :i rt repcount] lt 45]


Growing Scrolls variation 3, by M.H. Elhefni, Egypt (11 words)

for [i 1 14 6] [repeat 720 [fd :i rt repcount]]


Growing Scrolls variation 4, by M.H. Elhefni, Egypt (13 words)

for [i 1 18 2] [repeat 720 [fd :i rt repcount] lt 45]

index



Mountains, by
Keith Enevoldsen, U.S. (12 words)

repeat 2000 [setxy (repcount * 2) (ycor - 2 + random 5)]

index



Head, by
Keith Enevoldsen, U.S. (15 words)

repeat 38 [fd 5 rt 10] setx 55 setx 27 setxy 20 -10 setx 27
repeat 38 [fd 5 rt 10] setx 55 setx 27 setpos [20 -10] setx 27 (MicroWorlds)

index



Eye, by , Italy (12 words)

repeat 1800 [fd ln repcount bk 10*sin repcount rt 10]

index



Growing, by , Italy (13 words)

repeat 360 [repeat repcount [repeat repcount [fd repcount lt 15] home] lt 1]

(You may want to stop it before it is done.)

index



Don Quixote, by , Italy (14 words)

px repeat 360 [repeat repcount [repeat repcount [fd repcount lt 15] home] lt 1]

(Read the book.)

index



Ellipse, by , Italy (14 words)

repeat 360 [rt repcount fd 1 lt repcount * 2 fd 0.5 rt repcount]

(The eccentricity is e=0.5. If e=0, you have a circle and if e < 0 or e > 0 you have an ellipse, horizontal or vertical.
See Abelson-Di Sessa: "Turtle geometry".)

index



Polygon variations 1-3, by , Italy (14 words)

repeat 4 [repeat 30 [lt 90 fd 4 rt 90 fd 4] rt 90]

repeat 4 [repeat 20 [lt 160 fd 20 rt 160 fd 20] rt 90]

repeat 8 [repeat 20 [lt 170 fd 20 rt 170 fd 20] rt 45]

index



Rotating Circle, by M.H. Elhefni, Egypt (11 words)

px repeat 4000 [repeat 34 [fd 12 rt 10] rt 90]

index



Disappearing Triangles, by
Olga Tuzova, Russia (14 words)

px repeat 360 [setx 200 * (cos repcount) sety xcor * (cos repcount) home]

index



Smiling Fish, by
Yehuda Katz, Israel (15 words)

pu setx -157 pd
for [t -315 315] [setxy :t * sin :t :t * cos 2 * :t]

(It looks better like this:
for [t -315 315] [setxy :t * sin :t .5 * :t * cos 2 * :t]
as pictured above, but then it is too many words.)

index



Bird's Wings, by
Olga Tuzova, Russia (15 words)

repeat 360 [setx 200 * (sin repcount) sety xcor * (cos 2 * repcount) home]

index



Butterfly, by
Olga Tuzova, Russia (15 words)

repeat 360 [setx 200 * (sin 2 * repcount) sety xcor * (cos repcount) home]

index



Fish, by
Olga Tuzova, Russia (15 words)

repeat 360 [setx 200 * (cos 2 * repcount) sety xcor * (cos repcount) home]

index



Block, by de Walt Smith, U.S. (12 words)

repeat 25726 [setpos se (50 - random 100) (50 - random 100)]

index



Octa-star Spiral, by M.H. Elhefni, Egypt (15 words)

for [l 0 120 4] [repeat 8 [fd :l rt 135] fd :l rt 30]

index



Penta-star Spiral, 15W, M.H. Elhefni, Egypt (15 words)

for [l 0 95 3] [repeat 5 [fd :l rt 144] fd :l rt 30]

index



Designs 1-5, by Alex Mylonas' class, Greece (12 - 14 words)

repeat 36 [fd 60 rt 61 bk 80 lt 41 fd 85 rt 41]
repeat 16 [fd 85 lt 60 fd 107 bk 72 lt 53 fd 74]
repeat 100 [fd 5 + repcount rt 45 fd 10 + repcount rt 60]

repeat 36 [repeat 36 [fd 10 rt 10] fd repcount rt 90 fd repcount]

repeat 18 [repeat 5 [rt 40 fd 100 rt 120] rt 20]

index



mail
math cats' mailroom