Last active
April 4, 2025 11:45
-
-
Save dadecoza/52e714f2491ec9bc404eaa391fe2bba4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Program to draw a Mandebrot set --> | |
<!-- https://github.com/koce017/plhtml --> | |
<title>`Fractals`</title> | |
</head> | |
<body> | |
<main> | |
<var class="integer">w</var> | |
<var class="integer">h</var> | |
<var class="integer">a</var> | |
<var class="integer">b</var> | |
<var class="integer">c</var> | |
<var class="integer">d</var> | |
<var class="integer">m</var> | |
<var class="integer">x</var> | |
<var class="integer">y</var> | |
<var class="integer">g</var> | |
<var class="integer">s</var> | |
<var class="integer">r</var> | |
<var class="integer">zr</var> | |
<var class="integer">zi</var> | |
<var class="integer">i</var> | |
<var class="integer">t</var> | |
<var class="string">k</var> | |
<data value="80">w</data> | |
<data value="24">h</data> | |
<data value="-2000">a</data> | |
<data value="1000">b</data> | |
<data value="-1000">c</data> | |
<data value="1000">d</data> | |
<data value="30">m</data> | |
<data value="1000">s</data> | |
<data value="0">y</data> | |
<div data-while="y < h"> | |
<data value="c + y * (d-c) / h">g</data> | |
<data value="0">x</data> | |
<div data-while="x < w"> | |
<data value="a + x * (b - a) / w">r</data> | |
<data value="0">zr</data> | |
<data value="0">zi</data> | |
<data value="0">i</data> | |
<div data-while="(zr * zr + zi * zi) / s ≤ 4000 ∧ i < m"> | |
<data value="(zr * zr - zi * zi) / s + r">t</data> | |
<data value="(2 * zr * zi) / s + g">zi</data> | |
<data value="t">zr</data> | |
<data value="i + 1">i</data> | |
</div> | |
<data value="` `">k</data> | |
<div data-if="i = m"><data value="`@`">k</data></div> | |
<div data-if="i < m ∧ i > 25"><data value="`%`">k</data></div> | |
<div data-if="i ≤ 25 ∧ i > 20"><data value="`#`">k</data></div> | |
<div data-if="i ≤ 20 ∧ i > 15"><data value="`*`">k</data></div> | |
<div data-if="i ≤ 15 ∧ i > 10"><data value="`+`">k</data></div> | |
<div data-if="i ≤ 10 ∧ i > 5"><data value="`-`">k</data></div> | |
<div data-if="i ≤ 5 ∧ i > 5"><data value="`.`">k</data></div> | |
<div data-if="i ≤ 2"><data value="` `">k</data></div> | |
<output>k</output> | |
<data value="x + 1">x</data> | |
</div> | |
<output>`\n`</output> | |
<data value="y + 1">y</data> | |
</div> | |
</main> | |
</body> | |
</html> |
Author
dadecoza
commented
Apr 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment