Files
ioccc/2004/hoyle
Landon Curt Noll a17fe36163 add tmp/fake.gen_inventory.sh tool
The new tool, tmp/fake.gen_inventory.sh, now adds
a fake .inventory.html file to each winner entry.

Once the winner2nventory tool is written, the .inventory.html
will contain links to all winner files listed in the inventory.
For now, the tmp/fake.gen_inventory.sh tool just creates
a placeholder file.
2023-11-01 00:47:43 -07:00
..
2023-05-13 11:45:33 +10:00
2022-09-18 23:37:49 -07:00
2023-07-06 21:49:38 -07:00
2023-11-01 00:47:43 -07:00
2023-10-23 10:18:20 -07:00

Most Functional Output

Jonathan Hoyle
US
http://www.jonhoyle.com

To build:

make

To use:

./hoyle point ...

Try:

./hoyle 10 0.5
./hoyle 1 1 1 1
./hoyle 2 0 1 0 -0.001

Alternate code:

An alternate version of this entry, hoyle.alt.c, is provided. This alternate code has a missing newline and used a non-standard tab stop size.

To compile this alternate version:

make alt

Use hoyle.alt.c as you would hoyle above.

Judges' remarks:

This obfuscation functions at several levels. Note the clever use of use of #defines. The #define do(if,else), for example, is delightful. The code itself contains a bunch of curves designed to throw you off axis. :-)

Author's remarks:

This application graphs polynomials on a standard Cartesian coordinate system. Polynomials of the form ax^0 + bx^1 + cx^2 + ... are graphed by passing the coefficients a, b, c, etc. as double precision arguments. It allows up to 8 parameters (thus up to x^7).

Points of note:

  • the x axis goes from -32 to +31
  • the y axis auto scales!
  • up to 8 coefficients may be passed in
  • the graph will determine direction and use slashes and dashes rather than simple block Xs.

For example, ta graph y = x^2:

./hoyle 0 0 1

Note that:

./hoyle 0 0 2

will produce the same graph, since the y-axis is auto scaling.

This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. You are free to share and adapt this file under the terms of this license:

Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

For more information, see: https://creativecommons.org/licenses/by-sa/4.0/