summaryrefslogtreecommitdiff
path: root/elementarycellularautomata.html
blob: dd1b960043b3e9ad2ac4966c97f828763de1aa45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<html>
    <head>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <link rel="stylesheet" href="css/style.css">

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/p5.js"></script>

        <title>Elementary Cellular Automata</title>
        <link rel="stylesheet" href="css/cellularautomata.css">

    </head>

    <body>
        <div id="navbar"></div>
        <script src="navbar.js"></script>
        <h2>Elementary Cellular Automata</h2>

        <div id="explanation">
        This is a program which runs <a href="https://en.wikipedia.org/wiki/Elementary_cellular_automaton">elementary cellular automata</a>
        like <a href="https://en.wikipedia.org/wiki/Rule_110">Rule 110</a>. Each cell is determined by the 3 cells above it (assuming speed of light = 1), using
        rules specified by the rule number. The "speed of light", (A.K.A. the range) is how quickly information travels. Each cell is determined by
        the 2c+1 cells where c is the "speed of light". Rule number &lt; 2<sup>2<sup>2c+1</sup></sup>
        </div>

        Number of iterations: <input type="number" id="time" min="0" value="500"></input><br>
        Size (if the length of the starting configuration is less than the size, zeros will be added to both sides):
        <input type="number" id="size" value="500"><br>
        Starting configuration: <input type="text" id="start" value="101" size="50"></input><br>
        Rule number: <input type="number" id="rule" min="0" value="110"></input><br>
        "Speed of light": <input type="number" id="c" min="0" value="1"></input><br>
        <button id="run">Run</button>

        <div id="error"></div><br>
        <canvas id="canvas" width="1000" height="500"></canvas>

        <script src="js/elementarycellularautomata.js"></script>

    </body>
</html>