fix Makefile and README.md for 2013/mills

This commit is contained in:
Landon Curt Noll committed 2023-03-24 01:01:10 -07:00
1 parent 67b3e5b672
commit d9ca951bea
2 files changed
+234 -102

No files matched your search

+29 -29
View File
@@ -1,44 +1,46 @@
# Most timely rendered
Christopher Mills
<mrxo@sonic.net>
Christopher Mills
<mrxo@sonic.net>
# To build:
## Judges' comments:
### To build:
make mills
```sh
make
```
### To run:
./mills
```sh
./mills
```
### Try:
./mills &
```sh
./mills &
```
While that is running, point your favorite browser at: [http://localhost:8224](http://localhost:8224)
### Selected Judges Remarks:
## Judges' comments:
Who will be the first to post an image rendered during a leap-second?
## Author's comments:
The Program
===========
### The Program
This program is a handy graphical clock. Simply run the program, click *OK* to
any annoying security dialogs that pop up (aren't those annoying?), then fire
any annoying security dialog that pop up (aren't those annoying?), then fire
up your web browser and type in the following URL:
> <http://localhost:8224>
<http://localhost:8224>
You will soon be presented with a lovely dynamically rendered 3D scene that
also convienently tells you the current time!
also conveniently tells you the current time!
Usage Notes
-----------
### Usage Notes
The program will continue to give you the time of day as it changes by
reloading the page as often as it can render. If you grow tired of watching
@@ -50,13 +52,14 @@ money.
It would be possible to fix this by adding
n=1,setsockopt(s,SOL_SOCKET,SO_REUSEADDR,&n,sizeof n),
```c
n=1,setsockopt(s,SOL_SOCKET,SO_REUSEADDR,&n,sizeof n),
```
at an appropriate spot in the code (an exercise left to the reader). However,
as this limitation is documented, it is not techinally a bug.
as this limitation is documented, it is not technically a bug.
Details of Operation
--------------------
### Details of Operation
The program wears many hats (not literally). It is
@@ -68,7 +71,7 @@ The program wears many hats (not literally). It is
It replies to web requests with a PNG image that uses the
[Adam7](http://en.wikipedia.org/wiki/Adam7_algorithm)
encoding to return data progressively. Since the data is returned in Adam7
format, the scene is displayed initally at a lower resolution and allowed to
format, the scene is displayed initially at a lower resolution and allowed to
be progressively refined as time goes on. The ray tracer is integrally tied
to the PNG encoder, casting rays in the Adam7 order. The web server uses
PNG primarily because of PNG's ability to return data progressively, and not
@@ -88,11 +91,10 @@ not confirmed) that the code will, in fact, display leap seconds correctly.
To display the time, of course we would need a font. This font is encoded
as a string, using only the C whitespace characters. Clearly, the judges
intended this use of whitespace for data compression, since their tool
doesn't count whitepsace in strings differently than whitespace outside of
doesn't count whitespace in strings differently than whitespace outside of
them.
User-modifyable Features
------------------------
### User-modifyable Features
The code can be user-modified simply by changing the build command line.
The following symbols are defined in the build file:
@@ -112,8 +114,7 @@ The following symbols are defined in the build file:
Defines the position of the viewer (the eyepoint) for the scene. The eye
is looking at the origin (0, 0, 0).
Other Build Flags
-----------------
### Other Build Flags
The original program bound the server to `INADDR_ANY` to allow everyone to
experience the server's output. The Judges suggested that I instead restrict
@@ -125,11 +126,10 @@ family-friendly version `win_port` to protect against curious impressionable
youth trying to learn about sockets on Internet.
--------------------------------------------------------------------------------
<!--
## Copyright:
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
[judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
-->