1995 entries checked

Fixed formatting of README.md files.

Some typo fixes.

All entries work well.

Added some try commands.
This commit is contained in:
Cody Boone Ferguson committed 2023-03-18 10:03:51 -07:00
1 parent be60ae60ed
commit fa2a763f6c
13 files changed
+455 -396

No files matched your search

+113 -99
View File
@@ -9,82 +9,95 @@
make all
### To run
## To run:
./leo 1 | cat - /dev/tty | gs -
./leo 37 80 | cat - /dev/tty | gs -
## Judges' comments
Press return after each image is drawn.
The variable names are element-ary. If you find this confusing,
remember that it is nu-clear. :-)
Some Ghostscripts/Postscript programs cleared the screen right after
the image is drawn, so we added element 106 which acts as an input
buffer.
If you don't have gs or an equivalent postscript viewer, try:
echo "" | leo 1 > foo.ps
and send foo.ps to your local postscript printer.
To qualify for a category specially for yourself in the Geek code,
find out the all the secret switches that the author doesn't divulge !
(All switches are single characters on the command line - anything that's
not a number is a candidate)
## Author's comments
The usage is:
./leo [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]
where the first three are literal words, `cycle' is a positive
integer (0 is ignored), and `freq' is an integer (default = 0)
supposed to be in range 0..100 (bigger values are allowed, however).
Invalid parameters and options usually stop the command line
parsing (but not always, why?). The actual position of the word
options does not matter, so "prog.sh right Variable 1 70"
is equivalent to "prog.sh 0 0 0 1 Variable 70 right", etc.
See the author's information below on these details.
If `Variable' is used, `cycle' is almost ignored (see below) but has
to be present if you want to enter `freq' (and you usually do).
Some options to try (besides the obvious):
## Try:
./leo 1 | cat - /dev/tty | gs -
This draws the basic pattern I invented in high school:
./leo 37 80 | cat - /dev/tty | gs -
You take a big sheet of "arithmetic" paper and draw a line
of length 1 (between 2 crossings) it the center of the sheet:
If you don't have gs or an equivalent postscript viewer, try:
echo "" | ./leo 1 > foo.ps
and send foo.ps to your local postscript printer or open it in an appropriate
application (e.g. GIMP).
## Judges' comments:
Press return after each image is drawn.
The variable names are element-ary. If you find this confusing,
remember that it is nu-clear. :-)
Some Ghostscripts/Postscript programs cleared the screen right after
the image is drawn, so we added element 106 which acts as an input
buffer.
To qualify for a category specially for yourself in the Geek code,
find out all the secret switches that the author doesn't divulge !
(All switches are single characters on the command line - anything that's
not a number is a candidate)
## Author's comments:
The usage is:
./leo [ deep ] [ right ] [ Variable ] [ cycle [ freq ] ]
where the first three are literal words, `cycle' is a positive
integer (0 is ignored), and `freq' is an integer (default = 0)
supposed to be in range 0..100 (bigger values are allowed, however).
Invalid parameters and options usually stop the command line
parsing (but not always, why?). The actual position of the word
options does not matter, so "prog.sh right Variable 1 70"
is equivalent to "prog.sh 0 0 0 1 Variable 70 right", etc.
If `Variable' is used, `cycle' is almost ignored (see below) but has
to be present if you want to enter `freq' (and you usually do).
Some options to try (besides the obvious):
./leo 1 | cat - /dev/tty | gs -
This draws the basic pattern I invented in high school:
You take a big sheet of "arithmetic" paper and draw a line
of length 1 (between 2 crossings) it the center of the sheet:
|
This makes 2 open ends (I think the notion of an "open end" doesn't
require explanations) in step 1. Now, until there are open ends in step N,
repeat: for each open end pretend it points north and draw 2 lines going
northwest and northeast from it to the nearest crossings. This needs to be
done "simultaneously" for all ends that are open at the moment.
This makes 2 open ends (I think the notion of an "open end" doesn't
require explanations) in step 1. Now, until there are open ends in step N,
repeat: for each open end pretend it points north and draw 2 lines going
northwest and northeast from it to the nearest crossings. This needs to be
done "simultaneously" for all ends that are open at the moment.
Step 2:
Step 2:
\./
|
/ \
Step 3:
Step 3:
__| |__
\./
|
__ / \ __
| |
Step 4:
.
Step 4: \./ \./
\./ \./
\__| |__/
/ \./ \
|
@@ -93,7 +106,7 @@
/ \./ \
Step 5:
Step 5:
._| . |_.
__| \./ \./ |__
\__| |__/
@@ -106,16 +119,16 @@
The lines marked by I show the places where "simultaneity" is significant.
Note that so far all the drawings represent valid
structural formulas of some organic substances.
Note that so far all the drawings represent valid
structural formulas of some organic substances.
step 1: ethane
step 2: 2,3-dimethylbutane
step 3: (2,5-dimethyl;3,4-isopropyl)-hexane
step 4 and 5: I don't know. Do you?
etc.
step 1: ethane
step 2: 2,3-dimethylbutane
step 3: (2,5-dimethyl;3,4-isopropyl)-hexane
step 4 and 5: I don't know. Do you?
etc.
Step 6:
Step 6:
\./ \./ \./ \./
._| . |_. ._| . |_.
\__| \./ \./ |__/ \__| \./ \./ |__/
@@ -128,11 +141,11 @@ The lines marked by I show the places where "simultaneity" is significant.
| | | |
/ \ / \ / \ / \
depending on the desired "hairiness". The original (paper-based)
algorithm was "hairy", but it didn't look as good on the screen.
depending on the desired "hairiness". The original (paper-based)
algorithm was "hairy", but it didn't look as good on the screen.
The program cannot handle non-hairy mode 100% correctly - step 6 happens
to be
The program cannot handle non-hairy mode 100% correctly - step 6 happens
to be
|__
...__/ ...__/
@@ -144,71 +157,72 @@ The lines marked by I show the places where "simultaneity" is significant.
\ \.__
|
and so on: the horisontal symmetry has been lost. That's why
the opening for step 1 is not a single line but a cross:
and so on: the horisontal symmetry has been lost. That's why
the opening for step 1 is not a single line but a cross:
\./
/ \
To watch it repeatedly (as a screen saver), use:
To watch it repeatedly (as a screen saver), use:
leo 2 | cat - /dev/tty | gs -
./leo 2 | cat - /dev/tty | gs -
The command line:
The command line:
leo Variable 1 | cat - /dev/tty | gs -
./leo Variable 1 | cat - /dev/tty | gs -
This draws the same as above. Try:
This draws the same as above. Try:
leo Variable 1 1 | cat - /dev/tty | gs -
./leo Variable 1 1 | cat - /dev/tty | gs -
what happened to the picture? Increase `freq' and watch the changes.
what happened to the picture? Increase `freq' and watch the changes.
If `cycle' is more than 1, the program loops, allowing the user to
enjoy randomly changing patterns (the delay is 3 sec),
but there is a secret switch to suppress looping : useful
if you want to pipe the output to a printer.
If `cycle' is more than 1, the program loops, allowing the user to
enjoy randomly changing patterns (the delay is 3 sec),
but there is a secret switch to suppress looping : useful
if you want to pipe the output to a printer.
`uudecode` the spoiler below if you really want to know.
uudecode the spoiler below if you really want to know.
begin 664 spoiler1
M*%1H92!C;VQO;B J:7,J('1H92!S96-R970@<W=I=&-H("T@=&AE('-P86-E
=(&)E9F]R92!I="!I<R!N;W0@82!M:7-T86ME*0II
end
If `Variable' is used, the actual value of `cycle' doesn't matter,
as far as it is > 1. To figure out what difference
`cycle' makes when `Variable' is not used, try
If `Variable' is used, the actual value of `cycle' doesn't matter,
as far as it is > 1. To figure out what difference
`cycle' makes when `Variable' is not used, try
leo Variable 37 80 | cat - /dev/tty | gs -
./leo Variable 37 80 | cat - /dev/tty | gs -
and other values of `cycle'; smaller values usually require
smaller values of `freq' for the patterns to be non-trivial
and other values of `cycle'; smaller values usually require
smaller values of `freq' for the patterns to be non-trivial
The options `deep' and `right' make the patterns to be drawn in different
manners. Try all the examples above with `deep' and with `right'.
What is the difference between them?
The options `deep' and `right' make the patterns to be drawn in different
manners. Try all the examples above with `deep' and with `right'.
What is the difference between them?
...There is a little flaw in the implementation of the algorithm,
and sometimes the patterns are not symmetrical when they ought to be
(the program needs to be slightly changed to expose the flaw,
otherwise it is hardly noticeable, if ever).
...There is a little flaw in the implementation of the algorithm,
and sometimes the patterns are not symmetrical when they ought to be
(the program needs to be slightly changed to expose the flaw,
otherwise it is hardly noticeable, if ever).
A quick and dirty fix (turned on by another secret switch)
makes the patterns symmetrical, but a little too HAIRY.
A quick and dirty fix (turned on by another secret switch)
makes the patterns symmetrical, but a little too HAIRY.
There is one more secret switch (it shall remain nameless), and I don't
even want to explain what it does. You've been warned!
There is one more secret switch (it shall remain nameless), and I don't
even want to explain what it does. You've been warned!
* * *
Special thanks:
Special thanks:
- to PostScript syntax designers for the curly braces;
- to Dmitry Mendeleyev for his periodic table of elements;
- to Hydrogen for having 2 more isotopes.
- to PostScript syntax designers for the curly braces;
- to Dmitry Mendeleyev for his periodic table of elements;
- to Hydrogen for having 2 more isotopes.