improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. We add `--tab-stop=8` to all `pandoc(1)` executions in order to set a better tab stop indentation, especially for tab intended code blocks. Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26" to "1.6 2024-03-31". Fixed `1991/brnstnd/sorta.README.md` so that the sorta code is code blocks. Removed unneeded paragraph group in copyright in `inc/footer.default.html`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+34
-34
@@ -3,7 +3,7 @@
|
||||
Make sure you have the SDL1 (not SDL2!) development environment installed.
|
||||
|
||||
```sh
|
||||
make
|
||||
make
|
||||
```
|
||||
|
||||
There is alternate version that lets you redefine the width and height and number
|
||||
@@ -15,8 +15,8 @@ of iterations to use. See [Alternate code](#alternate-code) below.
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: doesn't work with some platforms - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
STATUS: doesn't work with some platforms - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix
|
||||
```
|
||||
|
||||
For more detailed information see [2006 monge bugs](../../bugs.html#2006_monge).
|
||||
@@ -25,7 +25,7 @@ For more detailed information see [2006 monge bugs](../../bugs.html#2006_monge).
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./monge expression ...
|
||||
./monge expression ...
|
||||
```
|
||||
|
||||
Incorrect formulas will ungracefully crash the program.
|
||||
@@ -34,7 +34,7 @@ Incorrect formulas will ungracefully crash the program.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ To use the default values, the same as [monge.c](monge.c), just do:
|
||||
|
||||
|
||||
```sh
|
||||
make alt
|
||||
make alt
|
||||
```
|
||||
|
||||
But if you wish to actually make use of it you will want to redefine one or more
|
||||
@@ -59,13 +59,13 @@ of the variables `W`, `H` and `I`. The defaults are (respectively) 400, 300 and
|
||||
the same then do:
|
||||
|
||||
```sh
|
||||
make clobber WIDTH=500 HEIGHT=500 alt
|
||||
make clobber WIDTH=500 HEIGHT=500 alt
|
||||
```
|
||||
|
||||
If you wish to keep the dimensions the same but change the iterations to 512:
|
||||
|
||||
```sh
|
||||
make clobber ITERATIONS=512 alt
|
||||
make clobber ITERATIONS=512 alt
|
||||
```
|
||||
|
||||
If you specify a value less than 1 for any of these it sets it back to the
|
||||
@@ -83,7 +83,7 @@ Use `monge.alt` exactly as you would `monge` above.
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -110,13 +110,13 @@ effort to work on both `i386` and `x86_64`. Portable it is! :)
|
||||
0. Compile using the Makefile, or just run:
|
||||
|
||||
```sh
|
||||
gcc monge.c -o monge -O3 `sdl-config --libs --cflags`
|
||||
gcc monge.c -o monge -O3 `sdl-config --libs --cflags`
|
||||
```
|
||||
|
||||
1. Run:
|
||||
|
||||
```sh
|
||||
./monge "z = 0" "z = z*z + c; Abs2(z) < 4"
|
||||
./monge "z = 0" "z = z*z + c; Abs2(z) < 4"
|
||||
```
|
||||
|
||||
2. Keep clicking with left or right button to zoom in or out.
|
||||
@@ -150,21 +150,21 @@ as you like (as understood by the C function `isspace()`).
|
||||
Supported operations and functions are:
|
||||
|
||||
```
|
||||
Operation | Description
|
||||
:-------- | :----------
|
||||
+,-,*,/ | Arithmetic operations, priority of * , / over +,- is
|
||||
| respected.
|
||||
|
|
||||
<,> | Compares the real parts of two complex numbers (the imaginary part
|
||||
| is ignored). Any number of conditions is allowed, the iteration
|
||||
| will just stop as soon as one of them fails.
|
||||
Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
|
||||
Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
|
||||
Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
|
||||
Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is
|
||||
| e^a*(cos(b)+sin(b)*i).
|
||||
Ln | Calculates the principal value of the natural logarithm, i.e.
|
||||
Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.
|
||||
Operation | Description
|
||||
:-------- | :----------
|
||||
+,-,*,/ | Arithmetic operations, priority of * , / over +,- is
|
||||
| respected.
|
||||
|
|
||||
<,> | Compares the real parts of two complex numbers (the imaginary part
|
||||
| is ignored). Any number of conditions is allowed, the iteration
|
||||
| will just stop as soon as one of them fails.
|
||||
Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
|
||||
Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
|
||||
Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
|
||||
Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is
|
||||
| e^a*(cos(b)+sin(b)*i).
|
||||
Ln | Calculates the principal value of the natural logarithm, i.e.
|
||||
Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.
|
||||
```
|
||||
|
||||
Here are a few examples of fractals you can draw:
|
||||
@@ -172,49 +172,49 @@ Here are a few examples of fractals you can draw:
|
||||
- Mandelbrot:
|
||||
|
||||
```sh
|
||||
./monge "z=1" "z=z*z+c; Abs2(z)<4"
|
||||
./monge "z=1" "z=z*z+c; Abs2(z)<4"
|
||||
```
|
||||
|
||||
- Mandelbrot (return time variation):
|
||||
|
||||
```sh
|
||||
./monge "z=c" "z=z*z+c; Abs2(z-c)>0.0001"
|
||||
./monge "z=c" "z=z*z+c; Abs2(z-c)>0.0001"
|
||||
```
|
||||
|
||||
- Julia, for `c=0.31+i*0.5`:
|
||||
|
||||
```sh
|
||||
./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z)<4"
|
||||
./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z)<4"
|
||||
```
|
||||
|
||||
- Julia (return time variation), `for c=0.31+i*0.5`:
|
||||
|
||||
```sh
|
||||
./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z-c)>0.0001"
|
||||
./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z-c)>0.0001"
|
||||
```
|
||||
|
||||
- Newton, for `x^3-1`:
|
||||
|
||||
```sh
|
||||
./monge "z=c" "p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"
|
||||
./monge "z=c" "p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"
|
||||
```
|
||||
|
||||
- Newton-Mandelbrot:
|
||||
|
||||
```sh
|
||||
./monge "z=0" "p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"
|
||||
./monge "z=0" "p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"
|
||||
```
|
||||
|
||||
- Phoenix, Mandelbrot version:
|
||||
|
||||
```sh
|
||||
./monge "z=0; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"
|
||||
./monge "z=0; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"
|
||||
```
|
||||
|
||||
- Phoenix, Julia version for `c=0.56667-i*0.5`:
|
||||
|
||||
```sh
|
||||
./monge "z=c; c=0.56667-i*0.5; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"
|
||||
./monge "z=c; c=0.56667-i*0.5; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"
|
||||
```
|
||||
|
||||
|
||||
|
||||
+35
-36
@@ -132,8 +132,7 @@
|
||||
<h2 id="author"><a name="author"></a>Author:</h2>
|
||||
<ul>
|
||||
<li>Name: <a href="../../authors.html#Maurizio_Monge">Maurizio Monge</a><br>
|
||||
Location: <a href="../../location.html#IT">IT</a> - <em>Italian Republic</em> (<em>Italy</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#IT">IT</a> - <em>Italian Republic</em> (<em>Italy</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -143,32 +142,32 @@ Location: <a href="../../location.html#IT">IT</a> - <em>Italian Republic</em> (<
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>Make sure you have the SDL1 (not SDL2!) development environment installed.</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
|
||||
<p>There is alternate version that lets you redefine the width and height and number
|
||||
of iterations to use. See <a href="#alternate-code">Alternate code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
<p>The current status of this entry is:</p>
|
||||
<pre><code>STATUS: doesn't work with some platforms - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<pre><code> STATUS: doesn't work with some platforms - please help us fix
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2006_monge">2006 monge 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">./monge</span> expression ...</span></code></pre></div>
|
||||
<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">./monge</span> expression ...</span></code></pre></div>
|
||||
<p>Incorrect formulas will ungracefully crash the program.</p>
|
||||
<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>
|
||||
<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="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate code lets you specify the width and height of the image as well
|
||||
as the number of iterations to perform.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>To use the default values, the same as <a href="monge.c">monge.c</a>, just do:</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="fu">make</span> alt</span></code></pre></div>
|
||||
<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="fu">make</span> alt</span></code></pre></div>
|
||||
<p>But if you wish to actually make use of it you will want to redefine one or more
|
||||
of the variables <code>W</code>, <code>H</code> and <code>I</code>. The defaults are (respectively) 400, 300 and
|
||||
\128. If you wish to change the image size to 500x500 but keep the iterations
|
||||
the same then do:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> clobber WIDTH=500 HEIGHT=500 alt</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber WIDTH=500 HEIGHT=500 alt</span></code></pre></div>
|
||||
<p>If you wish to keep the dimensions the same but change the iterations to 512:</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="fu">make</span> clobber ITERATIONS=512 alt</span></code></pre></div>
|
||||
<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="fu">make</span> clobber ITERATIONS=512 alt</span></code></pre></div>
|
||||
<p>If you specify a value less than 1 for any of these it sets it back to the
|
||||
default. The value 1 was selected arbitrarily and such a small number as 1 will
|
||||
not do anything useful but as long as it’s at least 1 it’ll not be redefined.
|
||||
@@ -177,7 +176,7 @@ anyway.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>monge.alt</code> exactly as you would <code>monge</code> above.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>For those who are familiar with the previous <a href="../../authors.html">IOCCC entries</a>,
|
||||
this program is best described as “<a href="../../1994/tvr/index.html">1994/tvr</a> meets
|
||||
@@ -194,11 +193,11 @@ effort to work on both <code>i386</code> and <code>x86_64</code>. Portable it is
|
||||
<ol start="0" type="1">
|
||||
<li>Compile using the Makefile, or just run:</li>
|
||||
</ol>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> monge.c <span class="at">-o</span> monge <span class="at">-O3</span> <span class="kw">`</span><span class="ex">sdl-config</span> <span class="at">--libs</span> <span class="at">--cflags</span><span class="kw">`</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> monge.c <span class="at">-o</span> monge <span class="at">-O3</span> <span class="kw">`</span><span class="ex">sdl-config</span> <span class="at">--libs</span> <span class="at">--cflags</span><span class="kw">`</span></span></code></pre></div>
|
||||
<ol type="1">
|
||||
<li>Run:</li>
|
||||
</ol>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z = 0"</span> <span class="st">"z = z*z + c; Abs2(z) < 4"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z = 0"</span> <span class="st">"z = z*z + c; Abs2(z) < 4"</span></span></code></pre></div>
|
||||
<ol start="2" type="1">
|
||||
<li><p>Keep clicking with left or right button to zoom in or out.</p></li>
|
||||
<li><p>Use the number pad <code>+</code> and <code>-</code> to increase/decrease the iteration count when
|
||||
@@ -222,54 +221,54 @@ expression must be an assignment (<code>[variable] = [expr]</code>) or a compari
|
||||
<code><</code> or <code>></code> (<code>[expr1] < [expr2]</code> or <code>[expr1] > [expr2]</code>), and you can add spaces
|
||||
as you like (as understood by the C function <code>isspace()</code>).</p>
|
||||
<p>Supported operations and functions are:</p>
|
||||
<pre><code>Operation | Description
|
||||
:-------- | :----------
|
||||
+,-,*,/ | Arithmetic operations, priority of * , / over +,- is
|
||||
| respected.
|
||||
|
|
||||
<,> | Compares the real parts of two complex numbers (the imaginary part
|
||||
| is ignored). Any number of conditions is allowed, the iteration
|
||||
| will just stop as soon as one of them fails.
|
||||
Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
|
||||
Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
|
||||
Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
|
||||
Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is
|
||||
| e^a*(cos(b)+sin(b)*i).
|
||||
Ln | Calculates the principal value of the natural logarithm, i.e.
|
||||
Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.</code></pre>
|
||||
<pre><code> Operation | Description
|
||||
:-------- | :----------
|
||||
+,-,*,/ | Arithmetic operations, priority of * , / over +,- is
|
||||
| respected.
|
||||
|
|
||||
<,> | Compares the real parts of two complex numbers (the imaginary part
|
||||
| is ignored). Any number of conditions is allowed, the iteration
|
||||
| will just stop as soon as one of them fails.
|
||||
Abs2 | Calculates the squared norm, i.e.: Abs2(a+b*i) is (a*a+b*b)+0*i.
|
||||
Re | Extract the real part, i.e.: Re(a+b*i) is a+0*i.
|
||||
Im | Extract the imaginary part, i.e.: Im(a+b*i) is b+0*i.
|
||||
Exp | Calculates the complex exponential, i.e. Exp(a+b*i) is
|
||||
| e^a*(cos(b)+sin(b)*i).
|
||||
Ln | Calculates the principal value of the natural logarithm, i.e.
|
||||
Ln(a+b*i) is ln(a*a+b*b)/2 + atan(b/a)*i.</code></pre>
|
||||
<p>Here are a few examples of fractals you can draw:</p>
|
||||
<ul>
|
||||
<li>Mandelbrot:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=1"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=1"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Mandelbrot (return time variation):</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=c"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Julia, for <code>c=0.31+i*0.5</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Julia (return time variation), <code>for c=0.31+i*0.5</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Newton, for <code>x^3-1</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=c"</span> <span class="st">"p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c"</span> <span class="st">"p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Newton-Mandelbrot:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=0"</span> <span class="st">"p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=0"</span> <span class="st">"p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Phoenix, Mandelbrot version:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb18"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=0; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb18"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=0; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<ul>
|
||||
<li>Phoenix, Julia version for <code>c=0.56667-i*0.5</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./monge</span> <span class="st">"z=c; c=0.56667-i*0.5; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c; c=0.56667-i*0.5; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<h3 id="compilation-and-portability">Compilation and portability</h3>
|
||||
<p>This program will only work on x86 (with an x87 FPU) or x86_64 machines,
|
||||
but it requires the SDL library.</p>
|
||||
|
||||
Reference in new issue
Block a user