Skip to content
CHAOS HOUSE

Every chaos generator should have a house!

The story of Chaos House

In my dissertation, I tried to classify about 84 analog chaos generators. The dynamics of each can be described by a system of ordinary differential equations. I already knew there were many more. I included the generators whose descriptions I could find at the time.

To see how a generator behaved as its parameters changed, I linked the computers in several teaching labs and divided the parameter combinations among their processor cores. Even with all those cores working together, a map for one generator took weeks.

I wanted an atlas with room for the generators I had yet to find. Today, GPUs and servers make those maps much faster to compute. In Chaos House you can pick a point on a map, see the corresponding trajectory, then change a coefficient and follow what happens to the motion.

I want this atlas to include every known chaos generator and to bring together the people who study them. Perhaps you know a system that is missing here, or have found an interesting regime in a familiar one. Share the equations and parameters so someone else can try your experiment.

Submission instructions

Simple model of spiking neurons — Izhikevich (2003)

Comments

Search and filters

Code
Appearance

Connecting to the archive…

Orbit parameters and sources

v̇ = 0.04·v·v+5·v+140−u+I
u̇ = a·(b·v−u)
v^(−)=threshold⇒v⁺ = c
v^(−)=threshold⇒u⁺ = u^(−)+d
dv/dt = 0.04·v·v+5·v+140−u+I
du/dt = a·(b·v−u)
v^(−)=threshold⇒v⁺ = c
v^(−)=threshold⇒u⁺ = u^(−)+d

    Spectrum and distribution settings
    Code and downloads

    izhikevich-reset / hybrid_euler.c

    First-order Euler with a threshold crossing and reset. Event time is interpolated within each substep. This is a hybrid system, not a smooth ODE.

    // Simple model of spiking neurons — Izhikevich (2003) | Chaos House 2026.11.25-readable.6
    // Source: https://doi.org/10.1109/tnn.2003.820440
    // Raw coordinates. See README.txt and the included source licenses.
    // First-order Euler with a threshold crossing and reset. Event time is interpolated within each substep. This is a hybrid system, not a smooth ODE.
    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>
    int main(void)
    {
    
        // 1. Parameters and initial conditions.
        double a = 0.02;
        double b = 0.2;
        double c = -65.0;
        double d = 8.0;
        double I = 10.0;
        double threshold = 30.0;
        double v_initial = -65.0;
        double u_initial = -13.0;
    
        // 2. Time settings. Time units belong to the mathematical model.
        double dt = 0.010000000000000002;
        double duration = 200.0;
        if (!(dt > 0 && duration >= dt && duration / dt <= 600000)) { fputs("Require a positive step and between 1 and 600000 steps. Reduce duration for a smaller dt.\n", stderr); return 1; }
        int steps = (int)round(duration / dt);
    
        if (!(dt > 0 && dt <= 1 && c < threshold && v_initial < threshold)) { fputs("Require 0 < dt <= 1 and initial/reset voltages below the threshold.\n", stderr); return 1; }
        double *t = calloc((size_t)steps + 1, sizeof(double));
        if (!t) { fputs("Not enough memory.\n", stderr); return 1; }
        double *v = calloc((size_t)steps + 1, sizeof(double));
        if (!v) { fputs("Not enough memory.\n", stderr); return 1; }
        double *u = calloc((size_t)steps + 1, sizeof(double));
        if (!u) { fputs("Not enough memory.\n", stderr); return 1; }
        v[0] = v_initial;
        u[0] = u_initial;
        int count = 1;
        int spike_count = 0;
        // 3. Locate events, apply v=c and u=u+d, then integrate the remainder.
        for (int step_index = 0; step_index < steps + 0; step_index++) {
            double current_v = v[step_index];
            double current_u = u[step_index];
            double remaining = dt;
            int event_guard = 0;
            while (remaining > 1e-12*dt) {
                event_guard = event_guard + 1;
                if (!(event_guard <= 10000)) { fputs("Too many reset events within one sample. Check the parameters.\n", stderr); return 1; }
                double upper = fmin(fmin(0.01, dt / 4.0), remaining);
                double lower = 0.0;
                double trial_step = upper;
                int found_event = 0;
                double candidate_v = current_v;
                double candidate_u = current_u;
                for (int search_iteration = 0; search_iteration < 38; search_iteration++) {
                    candidate_v = current_v + trial_step * (0.04 * current_v * current_v + 5.0 * current_v + 140.0 - current_u + I);
                    candidate_u = current_u + trial_step * (a * (b * current_v - current_u));
                    if (search_iteration == 0 && candidate_v < threshold) {
                        break;
                    }
                    found_event = 1;
                    if (search_iteration == 37) {
                        break;
                    }
                    if (candidate_v >= threshold) {
                        upper = trial_step;
                    } else {
                        lower = trial_step;
                    }
                    trial_step = (lower + upper)/2;
                }
                if (found_event == 1) {
                    current_v = c;
                    current_u = candidate_u + d;
                    spike_count = spike_count + 1;
                } else {
                    current_v = candidate_v;
                    current_u = candidate_u;
                }
                remaining = remaining - trial_step;
            }
            v[step_index + 1] = current_v;
            u[step_index + 1] = current_u;
            if (!(isfinite(v[step_index + 1]) && fabs(v[step_index + 1]) < 1e8 && isfinite(u[step_index + 1]) && fabs(u[step_index + 1]) < 1e8)) {
                fputs("Stopped at a non-finite or very large state. Try a smaller step or another preset. The plotted prefix is not a confirmed bounded attractor.\n", stderr);
                break;
            }
            t[step_index + 1] = (step_index + 1)*dt;
            count = count + 1;
        }
    
        // 4. Plot the trajectory. Green is the start; red is the end.
        // Lines across resets represent jumps, not continuous ODE motion. spike_count records the number of resets.
        FILE *file = fopen("izhikevich-reset-trajectory.dat", "w");
        if (!file) { perror("trajectory file"); return 1; }
        for (int row = 0; row < count; row++) {
            fprintf(file, "%.17g %.17g\n", v[row], u[row]);
        }
        int write_failed = ferror(file);
        if (fclose(file) != 0) write_failed = 1;
        if (write_failed) return 1;
        // Requires gnuplot on PATH. Set GNUTERM=svg for a headless SVG output.
        int plot_status = system("gnuplot -persist -e 'set title \"Simple model of spiking neurons — Izhikevich (2003) / Euler with reset events\"; set xlabel \"v\"; set ylabel \"u\"; set grid; stats \"izhikevich-reset-trajectory.dat\" using 1 nooutput; last=STATS_records-1; plot \"izhikevich-reset-trajectory.dat\" using 1:2 with lines title \"Trajectory\", \"\" every ::0::0 using 1:2 with points pt 7 lc rgb \"green\" title \"Start\", \"\" every ::last::last using 1:2 with points pt 7 lc rgb \"red\" title \"End\"'");
        free(t);
        free(v);
        free(u);
        return plot_status == 0 ? 0 : 1;
    }
    

    Beyond the browser

    Choose a programming language and download the files you need from the downloads page. Choose a programming language

    Does your chaos have a name?

    We want to bring every chaos generator into one open catalogue and connect the people who study chaos and nonlinear dynamics. Developing your own system? Send its equations, parameters, initial state, recommended method and step, a reference and the code licence. After review we will add it with your name and link.

    Submission instructions · Write to the author

    Comments

    Simple model of spiking neurons — Izhikevich (2003)

    Generator ranking

    Collections and index · 420 models