force use of pandoc version >= 3.1.12.2
The `bin/pandoc-wrapper.sh` tool will verify that the ssytem has a recent enough version of `pandoc(1)`. We explain why we insist on `pandoc(1)`. version >= 3.1.12.2 in comments where the $PANDOC_MIN_VERSION is set. Added `--wrap=preserve` as a default argument to `pandoc(1)`. While this change will impact every HTML file generated, we believe this will improve the ability of someone to look at the generated HTML and correlate with the original markdown. Changed `bin/pandoc-wrapper.sh` VERSION from "1.4.2 2024-03-17" to "1.4.3 2024-03-18". Performed `make www` to achieve all of the above and to generate HTML using the new `--wrap=preserve` `pandoc(1)` mode.
This commit is contained in:
1 parent
9eb7a54e9f
commit
b0b212acb1
402 files changed
+37061
-55132
No files matched your search
+73
-107
@@ -129,10 +129,9 @@
|
||||
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Philip_Blakely">Philip
|
||||
Blakely</a><br> Location: <a href="../../location.html#GB">GB</a> -
|
||||
<em>United Kingdom of Great Britain and Northern Ireland</em>
|
||||
(<em>United Kingdom</em>) <br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Philip_Blakely">Philip Blakely</a><br>
|
||||
Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great Britain and Northern Ireland</em> (<em>United Kingdom</em>)
|
||||
<br><br></li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -145,44 +144,38 @@ Blakely</a><br> Location: <a href="../../location.html#GB">GB</a> -
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a
|
||||
href="../../bugs.html#2012_blakely">2012 blakely bugs</a>.</p>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2012_blakely">2012 blakely bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./blakely</span> <span class="st">"RPN formula"</span> resolution <span class="op">></span> output.gif</span></code></pre></div>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Several IOCCC themes (<a
|
||||
href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN
|
||||
calculator</a>, animated <a
|
||||
href="https://en.wikipedia.org/wiki/GIF">GIF</a> generator, <a
|
||||
href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">ray
|
||||
tracing</a>) in one package! Very impressive!</p>
|
||||
<p>The checkerboard pattern in the output can be broken. Could you
|
||||
figure out how?</p>
|
||||
<p>Several IOCCC themes (<a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN
|
||||
calculator</a>, animated
|
||||
<a href="https://en.wikipedia.org/wiki/GIF">GIF</a> generator, <a href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">ray
|
||||
tracing</a>) in one package!
|
||||
Very impressive!</p>
|
||||
<p>The checkerboard pattern in the output can be broken. Could you figure out how?</p>
|
||||
<p>Larger GIF files confuse some image viewers.</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<h3 id="remarks">Remarks</h3>
|
||||
<p>This program renders a generic <a
|
||||
href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN</a>
|
||||
expression in <a
|
||||
href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">ray-traced</a>
|
||||
animated <a href="https://en.wikipedia.org/wiki/GIF">GIF</a> form. The
|
||||
expression in spatial variables <code>x</code> and <code>y</code> is
|
||||
specified on the command-line with the required resolution, and an
|
||||
animated GIF showing a fly-around of the resulting surface is output to
|
||||
<code>stdout</code>.</p>
|
||||
<p>This program renders a generic
|
||||
<a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN</a> expression in
|
||||
<a href="https://en.wikipedia.org/wiki/Ray_tracing_(graphics)">ray-traced</a> animated
|
||||
<a href="https://en.wikipedia.org/wiki/GIF">GIF</a> form. The expression in spatial
|
||||
variables <code>x</code> and <code>y</code> is specified on the command-line with the required
|
||||
resolution, and an animated GIF showing a fly-around of the resulting surface is
|
||||
output to <code>stdout</code>.</p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<p>The program should be run as:</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./blakely</span> xy<span class="pp">*</span> 32 <span class="op">></span> pic.gif</span></code></pre></div>
|
||||
<p>where the first parameter is a <a
|
||||
href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN</a>
|
||||
expression, and the second is the width of the required <a
|
||||
href="https://en.wikipedia.org/wiki/GIF">GIF</a>, up to a maximum of
|
||||
250.</p>
|
||||
<p>The expressions are written in <a
|
||||
href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">Reverse
|
||||
Polish Notation</a> with the following characters recognised:</p>
|
||||
<p>where the first parameter is a
|
||||
<a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN</a> expression, and the
|
||||
second is the width of the required <a href="https://en.wikipedia.org/wiki/GIF">GIF</a>, up
|
||||
to a maximum of 250.</p>
|
||||
<p>The expressions are written in <a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">Reverse Polish
|
||||
Notation</a> with the
|
||||
following characters recognised:</p>
|
||||
<pre><code>+, -, *, / - usual arithmetic operations
|
||||
^ - Exponentiation; valid for constant exponent only
|
||||
s - sin
|
||||
@@ -192,111 +185,84 @@ d - duplicate number on stack
|
||||
t - transpose top two elements on stack
|
||||
x - x coordinate value
|
||||
y - y coordinate value</code></pre>
|
||||
<p>NB: all arithmetic is done in double precision, so <code>23/</code>
|
||||
is two-thirds, rather than 0.</p>
|
||||
<p>The surface plotted corresponds to <code>-1 <= x,y <= 1</code>
|
||||
and for best results, the generated <code>z</code> value should lie
|
||||
between <code>-1</code> and <code>1</code>.</p>
|
||||
<p>If there is a division by zero, square-root of a negative number, or
|
||||
similar operation, then the results are undefined.</p>
|
||||
<p>NB: all arithmetic is done in double precision, so <code>23/</code> is two-thirds, rather
|
||||
than 0.</p>
|
||||
<p>The surface plotted corresponds to <code>-1 <= x,y <= 1</code> and for best results, the
|
||||
generated <code>z</code> value should lie between <code>-1</code> and <code>1</code>.</p>
|
||||
<p>If there is a division by zero, square-root of a negative number, or similar
|
||||
operation, then the results are undefined.</p>
|
||||
<h3 id="examples">Examples</h3>
|
||||
<p>For test-runs, use a resolution of 32. For simple expressions, the <a
|
||||
href="https://en.wikipedia.org/wiki/GIF">GIF</a> generation should take
|
||||
only a few seconds with a modern processor and full optimization.
|
||||
Runtime scales as <a
|
||||
href="https://en.wikipedia.org/wiki/Big_O_notation">O(N^3)</a> with
|
||||
resolution <code>N</code>, and more complex expressions take longer to
|
||||
compute. For example, increasing the resolution of
|
||||
<code>ripple.gif</code> to 250 took ~35 minutes to render on an <a
|
||||
href="https://en.wikipedia.org/wiki/Intel_Core#Core_i7">i7
|
||||
<p>For test-runs, use a resolution of 32. For simple expressions, the
|
||||
<a href="https://en.wikipedia.org/wiki/GIF">GIF</a> generation should take only
|
||||
a few seconds with a modern processor and full optimization. Runtime scales as
|
||||
<a href="https://en.wikipedia.org/wiki/Big_O_notation">O(N^3)</a> with resolution <code>N</code>,
|
||||
and more complex expressions take longer to compute. For example, increasing the
|
||||
resolution of <code>ripple.gif</code>
|
||||
to 250 took ~35 minutes to render on an <a href="https://en.wikipedia.org/wiki/Intel_Core#Core_i7">i7
|
||||
processor</a>.</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./blakely</span> xy<span class="pp">*</span> 32 <span class="op">></span> saddle.gif</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./blakely</span> xx<span class="pp">*</span>yy<span class="pp">*</span>1++d5<span class="pp">*</span>ct/ 64 <span class="op">></span> ripple.gif</span></code></pre></div>
|
||||
<h3 id="algorithm">Algorithm</h3>
|
||||
<p>A generic root-finding algorithm to find the point of intersection
|
||||
between a ray and the surface is done using a simple forward search from
|
||||
the eye. In order to make the rendering realistic, both the value of the
|
||||
expression, and its derivative with respect to <code>x</code> and
|
||||
<code>y</code> must be tracked. This is done using an obvious
|
||||
stack-based approach.</p>
|
||||
<p>A generic root-finding algorithm to find the point of intersection between a ray
|
||||
and the surface is done using a simple forward search from the eye. In order to
|
||||
make the rendering realistic, both the value of the expression, and its
|
||||
derivative with respect to <code>x</code> and <code>y</code> must be tracked. This is done using an
|
||||
obvious stack-based approach.</p>
|
||||
<h3 id="obfuscations">Obfuscations</h3>
|
||||
<p>Much of the obfuscation is achieved through the use of single-letter
|
||||
variables and <code>#define</code>s. The characters output for the <a
|
||||
href="https://en.wikipedia.org/wiki/GIF#File_format">GIF format</a> are
|
||||
generated in myriad and wonderful ways, making use of <a
|
||||
href="https://en.wikipedia.org/wiki/Exclusive_or">XOR</a>, return values
|
||||
from <code>putchar()</code>, and odd expressions. The layout is in the
|
||||
form of <code>X Y Z</code>.</p>
|
||||
<p>Much of the obfuscation is achieved through the use of single-letter variables
|
||||
and <code>#define</code>s. The characters output for the <a href="https://en.wikipedia.org/wiki/GIF#File_format">GIF
|
||||
format</a> are generated in myriad
|
||||
and wonderful ways, making use of
|
||||
<a href="https://en.wikipedia.org/wiki/Exclusive_or">XOR</a>, return values from
|
||||
<code>putchar()</code>, and odd expressions. The layout is in the form of <code>X Y Z</code>.</p>
|
||||
<h3 id="limitations">Limitations</h3>
|
||||
<p>ASCII is assumed since many bytes for the <a
|
||||
href="https://en.wikipedia.org/wiki/GIF">GIF</a> output are generated
|
||||
from characters given in the source code. On compilation a few warnings
|
||||
about parentheses come up when using gcc 4.6.3, and one about no return
|
||||
value from <code>main()</code> (who uses exit codes anyway?), but clang
|
||||
3.1 emits no warnings.</p>
|
||||
<p>ASCII is assumed since many bytes for the
|
||||
<a href="https://en.wikipedia.org/wiki/GIF">GIF</a> output are generated from characters
|
||||
given in the source code. On compilation a few warnings about parentheses come
|
||||
up when using gcc 4.6.3, and one about no return value from <code>main()</code> (who uses
|
||||
exit codes anyway?), but clang 3.1 emits no warnings.</p>
|
||||
<h3 id="questions">Questions</h3>
|
||||
<ul>
|
||||
<li>Apart from their appearance when computing the <a
|
||||
href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN
|
||||
expression</a>, <a
|
||||
href="https://en.wikipedia.org/wiki/Sine_and_cosine">sin and cos</a> are
|
||||
not used. How do we then get the correct angles for rotation?</li>
|
||||
<li>Apart from their appearance when computing the <a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN
|
||||
expression</a>, <a href="https://en.wikipedia.org/wiki/Sine_and_cosine">sin and
|
||||
cos</a> are not used.
|
||||
How do we then get the correct angles for rotation?</li>
|
||||
<li>Exactly how many times will the animation repeat?</li>
|
||||
<li>Why is there an upper limit of 250x250 for the resolution?</li>
|
||||
<li>What is the point of <code>b[0]</code>?</li>
|
||||
<li>Where are the words <code>NETSCAPE</code> and <code>GIF</code>
|
||||
hidden in the source?</li>
|
||||
<li>Where are the words <code>NETSCAPE</code> and <code>GIF</code> hidden in the source?</li>
|
||||
</ul>
|
||||
<p>(Note that the author may or may not be able to answer all of the
|
||||
above questions.)</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0
|
||||
License:</h2>
|
||||
<p>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:</p>
|
||||
<p>(Note that the author may or may not be able to answer all of the above
|
||||
questions.)</p>
|
||||
<h2 id="copyright-and-cc-by-sa-4.0-license">Copyright and CC BY-SA 4.0 License:</h2>
|
||||
<p>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:</p>
|
||||
<pre><code>Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)</code></pre>
|
||||
<p>For more information, see:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
<p>For more information, see: https://creativecommons.org/licenses/by-sa/4.0/</p>
|
||||
|
||||
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
<!-- START: this line starts content for HTML phase 22 by: bin/output-index-inventory.sh via bin/md2html.sh -->
|
||||
|
||||
<!-- START: this line starts content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
<h1 id="inventory-for-2012blakely"><a name="inventory"></a>Inventory for
|
||||
2012/blakely</h1>
|
||||
<h1 id="inventory-for-2012blakely"><a name="inventory"></a>Inventory for 2012/blakely</h1>
|
||||
<p><a href="#top">Jump to top</a></p>
|
||||
<h2 id="primary-files">Primary files</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/blakely.c">blakely.c</a>
|
||||
- entry source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/Makefile">Makefile</a>
|
||||
- entry Makefile</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/blakely.orig.c">blakely.orig.c</a>
|
||||
- original source</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/try.sh">try.sh</a>
|
||||
- how to run</li>
|
||||
<li><a href="2012_blakely.tar.bz2">2012_blakely.tar.bz2</a> - download
|
||||
entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/blakely.c">blakely.c</a> - entry source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/Makefile">Makefile</a> - entry Makefile</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/blakely.orig.c">blakely.orig.c</a> - original source</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/try.sh">try.sh</a> - how to run</li>
|
||||
<li><a href="2012_blakely.tar.bz2">2012_blakely.tar.bz2</a> - download entry source</li>
|
||||
</ul>
|
||||
<h2 id="secondary-files">Secondary files</h2>
|
||||
<ul>
|
||||
<li><a href="index.html">index.html</a> - entry home page</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/.entry.json">.entry.json</a>
|
||||
- description of entry in JSON</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/.gitignore">.gitignore</a>
|
||||
- list of files that should not be committed under git</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/.entry.json">.entry.json</a> - description of entry in JSON</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/.gitignore">.gitignore</a> - list of files that should not be committed under git</li>
|
||||
<li><a href=".path">.path</a> - directory path from top directory</li>
|
||||
<li><a
|
||||
href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/README.md">README.md</a>
|
||||
- markdown source for index.html</li>
|
||||
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2012/blakely/README.md">README.md</a> - markdown source for index.html</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-inventory.sh -->
|
||||
|
||||
Reference in new issue
Block a user