Fix and format 2011/zucker/README.md

There was a mistake in the try command where it would inject into the
image the previous command specifically because of !! - must escape
these even inside double quotes (there were three).

Typo fixes here and there.

Format fixes.

Unlike the others I did not add any additional links as I am almost out
of time for the day. I will look at this again another time as there
were a number of things that I think would be improved with links.

Fix author URL in README.md and winners.{csv,html}.
This commit is contained in:
Cody Boone Ferguson committed 2023-05-01 10:31:29 -07:00
1 parent 005d8c0f93
commit ffc50a98a5
3 files changed
+22 -13

No files matched your search

+20 -11
View File
@@ -1,8 +1,8 @@
# Most shiny # Most shiny
Matt Zucker Matt Zucker
<mzucker1@swarthmore.edu> <mzucker1@swarthmore.edu>
<http://www.swarthmore.edu/NatSci/mzucker1/> <https://mzucker.github.io/swarthmore/>
## To build: ## To build:
@@ -19,12 +19,21 @@ make
## Try: ## Try:
```sh ```sh
./zucker "Hello!!!" > hello.ppm ./zucker "Hello\!\!\!" > hello.ppm
./zucker faster\! -preview > image2.ppm ./zucker faster\! -preview > image2.ppm
``` ```
Display the PPM image with your favorite image viewer. Display the PPM image with your favorite image viewer.
The author gave options for macOS but we note that you can just do:
```sh
open image.ppm
```
which will open `Preview.app` which will let you look at the image no problem.
No need to install additional software.
## Judges' remarks: ## Judges' remarks:
The rendered image is centered and is output as a 600 by 220 pixel PPM. The rendered image is centered and is output as a 600 by 220 pixel PPM.
@@ -36,7 +45,7 @@ This entry uses no local variables. None! At! All!
### An image generator ### An image generator
### What it does: #### What it does:
This program makes pretty pictures. To see the default output, try This program makes pretty pictures. To see the default output, try
running running
@@ -62,7 +71,7 @@ program as follows:
./zucker "your text" > image.ppm ./zucker "your text" > image.ppm
``` ```
To mitigate long runtimes, the program can be invoked in a "preview" To mitigate long runtime, the program can be invoked in a "preview"
mode by appending `-preview` to the command line arguments, like so: mode by appending `-preview` to the command line arguments, like so:
```sh ```sh
@@ -73,7 +82,7 @@ If your platform distinguishes between binary and text streams, you
may need to insert some code to reopen standard output in binary mode may need to insert some code to reopen standard output in binary mode
at the start of `main`. An ASCII platform is assumed. at the start of `main`. An ASCII platform is assumed.
### Pedagogical value: #### Pedagogical value:
This program is quite suitable for the inexperienced programmer, due This program is quite suitable for the inexperienced programmer, due
to a number of considerations: to a number of considerations:
@@ -101,7 +110,7 @@ to a number of considerations:
reflection ray at an object's surface, given the incoming reflection ray at an object's surface, given the incoming
direction and surface normal. direction and surface normal.
### Further details (contains spoilers): #### Further details (contains spoilers):
The program is not quite a traditional ray tracer, but a "sphere The program is not quite a traditional ray tracer, but a "sphere
tracer" which uses distance fields to encode proximity to objects in tracer" which uses distance fields to encode proximity to objects in
@@ -135,14 +144,14 @@ it is impossible to modify either the image width or height without
changing the source in at least three different places, including changing the source in at least three different places, including
inside the large string literal. inside the large string literal.
Some of the functions are simple vector algebra operations such as Some of the functions are simple vector algebraic operations such as
vector construction, dot product, and normalization. However, it was vector construction, dot product, and normalization. However, it was
found to be much more compact to define a single operation for found to be much more compact to define a single operation for
multiply-and-add rather than to have separate functions for addition, multiply-and-add rather than to have separate functions for addition,
subtraction, and scaling. Again, compactness led to obfuscation. subtraction, and scaling. Again, compactness led to obfuscation.
This program heavily abuses `for` loops. The comma operator is used to This program heavily abuses `for` loops. The comma operator is used to
get as much milage as possible out of statements inside of loop get as much mileage as possible out of statements inside of loop
declarations. Between `for` loops, the comma operator, and the ternary declarations. Between `for` loops, the comma operator, and the ternary
operator, it was possible to avoid `if` and `while` altogether. operator, it was possible to avoid `if` and `while` altogether.
@@ -155,7 +164,7 @@ performed just about everywhere. Fascinatingly, this doesn't seem to
affect performance too badly. Sometimes when an explicit cast affect performance too badly. Sometimes when an explicit cast
(i.e. from float to int) is needed, the program instead simply assigns (i.e. from float to int) is needed, the program instead simply assigns
to a free variable of the desired type instead. Both the `array[index]` to a free variable of the desired type instead. Both the `array[index]`
and `index[array]` notations are used interchangably throughout the and `index[array]` notations are used interchangeably throughout the
program. program.
Two other programs were written to support development of this Two other programs were written to support development of this
+1 -1
View File
@@ -122,7 +122,7 @@ Mark Isaak,Mark_Isaak,null,null,null,null,null,null
Mark Plummer,Mark_Plummer,http://www.nrgnet.com/markus,null,markus@nrgnet.com,null,null,null Mark Plummer,Mark_Plummer,http://www.nrgnet.com/markus,null,markus@nrgnet.com,null,null,null
Mark Schnitzius,Mark_Schnitzius,null,null,schnitzi@gmail.com,null,null,null Mark Schnitzius,Mark_Schnitzius,null,null,schnitzi@gmail.com,null,null,null
Mary Ann Horton,Mary_Ann_Horton,https://maryannhorton.com,null,null,null,null Mary Ann Horton,Mary_Ann_Horton,https://maryannhorton.com,null,null,null,null
Matt Zucker,Matt_Zucker,http://www.swarthmore.edu/NatSci/mzucker1/,null,mzucker1@swarthmore.edu,null,null,null Matt Zucker,Matt_Zucker,https://mzucker.github.io/swarthmore/,mzucker1@swarthmore.edu,null,null,null
Maurizio Monge,Maurizio_Monge,null,null,maurizio.monge@gmail.com,IT,null,null Maurizio Monge,Maurizio_Monge,null,null,maurizio.monge@gmail.com,IT,null,null
Mauro Persano,Mauro_Persano,null,null,mauro_persano@yahoo.com,BR,null,null Mauro Persano,Mauro_Persano,null,null,mauro_persano@yahoo.com,BR,null,null
Michael Ash,Michael_Ash,null,null,mike@mikeash.com,US,null,null Michael Ash,Michael_Ash,null,null,mike@mikeash.com,US,null,null
Can't render this file because it contains an unexpected character in line 23 and column 6.
+1 -1
View File
@@ -1344,7 +1344,7 @@ Contest </I></FONT></CENTER><BR>
<LI TYPE=square>Balanced use of obfuscation - Gold award (<A HREF="years.html#2012_zeitak">2012 zeitak</A>) <LI TYPE=square>Balanced use of obfuscation - Gold award (<A HREF="years.html#2012_zeitak">2012 zeitak</A>)
</UL><BR> </UL><BR>
<LI TYPE=none><A NAME="Matt_Zucker"></A><B><a href="&#109;&#x61;&#x69;&#x6C;&#x74;&#111;&#x3A;m&#122;&#117;&#x63;&#107;&#101;&#114;&#49;&#x40;&#x73;&#119;a&#x72;&#x74;&#104;&#x6D;&#x6F;&#114;&#x65;&#46;&#101;&#x64;&#117;">Matt Zucker</a></B> -- <A HREF="http://www.swarthmore.edu/NatSci/mzucker1/">http://www.swarthmore.edu/NatSci/mzucker1/</a> <LI TYPE=none><A NAME="Matt_Zucker"></A><B><a href="&#109;&#x61;&#x69;&#x6C;&#x74;&#111;&#x3A;m&#122;&#117;&#x63;&#107;&#101;&#114;&#49;&#x40;&#x73;&#119;a&#x72;&#x74;&#104;&#x6D;&#x6F;&#114;&#x65;&#46;&#101;&#x64;&#117;">Matt Zucker</a></B> -- <A HREF="https://mzucker.github.io/swarthmore/">https://mzucker.github.io/swarthmore/</a>
<UL> <UL>
<LI TYPE=square>Most shiny (<A HREF="years.html#2011_zucker">2011 zucker</A>) <LI TYPE=square>Most shiny (<A HREF="years.html#2011_zucker">2011 zucker</A>)
</UL><BR> </UL><BR>