До вмісту
CHAOS HOUSE

Кожен генератор хаосу повинен мати свій дім!

Як з’явився Chaos House

У своїй дисертації я спробував класифікувати близько 84 аналогових генераторів хаосу. Динаміку кожного з них можна описати системою звичайних диференціальних рівнянь. Уже тоді я знав, що таких генераторів значно більше. До дисертації увійшли ті, про які мені вдалося знайти матеріали.

Щоб побачити, як поводиться генератор за різних значень параметрів, я об’єднував у мережу комп’ютери з кількох навчальних класів і розподіляв комбінації параметрів між процесорними ядрами. Навіть коли всі ядра працювали одночасно, на побудову карти одного генератора йшли тижні.

Я хотів зібрати в атласі й ті генератори, до яких тоді не дістався. Сучасні відеокарти й сервери дають змогу будувати такі карти значно швидше. У Chaos House можна вибрати точку на карті, побачити відповідну траєкторію, а потім змінити коефіцієнт і простежити, як зміниться рух.

Я хочу зібрати тут усі відомі генератори хаосу й познайомити між собою людей, які їх досліджують. Можливо, ви знаєте систему, якої тут ще немає, або відкрили цікавий режим у знайомого генератора. Поділіться рівняннями й параметрами, щоб інші могли повторити ваш дослід.

Як запропонувати модель

Внутрішня течія у моделі плавця — Blake

Коментарі

Пошук і фільтри

Код
Оформлення

З’єднання з архівом…

Параметри орбіти й джерела

ṙ = ((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₁·cos(1·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₁·sin(1·θ))·(1·r¹·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₂·cos(2·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₂·sin(2·θ))·(2·r²·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₃·cos(3·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₃·sin(3·θ))·(3·r³·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₄·cos(4·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₄·sin(4·θ))·(4·r⁴·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₅·cos(5·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₅·sin(5·θ))·(5·r⁵·(r²−1))/(r)
θ̇ = ((2·r+((r²−1)·1)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₁·cos(1·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₁·sin(1·θ))·r¹+(2·r+((r²−1)·2)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₂·cos(2·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₂·sin(2·θ))·r²+(2·r+((r²−1)·3)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₃·cos(3·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₃·sin(3·θ))·r³+(2·r+((r²−1)·4)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₄·cos(4·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₄·sin(4·θ))·r⁴+(2·r+((r²−1)·5)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₅·cos(5·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₅·sin(5·θ))·r⁵)/(r)
clock̇ = 1
dr/dt = ((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₁·cos(1·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₁·sin(1·θ))·(1·r¹·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₂·cos(2·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₂·sin(2·θ))·(2·r²·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₃·cos(3·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₃·sin(3·θ))·(3·r³·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₄·cos(4·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₄·sin(4·θ))·(4·r⁴·(r²−1))/(r)+((1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₅·cos(5·θ)+(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₅·sin(5·θ))·(5·r⁵·(r²−1))/(r)
dθ/dt = ((2·r+((r²−1)·1)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₁·cos(1·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₁·sin(1·θ))·r¹+(2·r+((r²−1)·2)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₂·cos(2·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₂·sin(2·θ))·r²+(2·r+((r²−1)·3)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₃·cos(3·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₃·sin(3·θ))·r³+(2·r+((r²−1)·4)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₄·cos(4·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₄·sin(4·θ))·r⁴+(2·r+((r²−1)·5)/(r))·((0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ))))·a₅·cos(5·θ)−(1−(0.5+0.5·tanh(20·τ·sin((2·π·clock)/(τ)))))·g₅·sin(5·θ))·r⁵)/(r)
d(clock)/dt = 1

    Налаштування спектра й розподілу
    Код і завантаження

    interior-squirmer / euler.c

    Явний метод Ейлера першого порядку. Кожне рівняння обчислюється один раз за крок. Початковий крок дорівнює одній десятій кроку сцени. Для перевірки збіжності зменште його ще раз.

    // Внутрішня течія у моделі плавця — Blake | Chaos House 2026.11.25-readable.6
    // Джерело: https://doi.org/10.1017/s0004972700047134
    // Вихідні координати. Див. README.txt і додані ліцензії джерел.
    // Явний метод Ейлера першого порядку. Кожне рівняння обчислюється один раз за крок. Початковий крок дорівнює одній десятій кроку сцени. Для перевірки збіжності зменште його ще раз.
    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>
    int main(void)
    {
    
        // 1. Параметри та початкові умови.
        double a_1 = 0.5;
        double a_2 = 0.5;
        double a_3 = 0.5;
        double a_4 = 0.5;
        double a_5 = 0.5;
        double g_1 = 0.5;
        double g_2 = 0.5;
        double g_3 = 0.5;
        double g_4 = 0.5;
        double g_5 = 0.5;
        double tau = 3;
        double r_initial = 0.1;
        double theta_initial = 0.1;
        double clock_initial = 0.1;
    
        // 2. Параметри часу в одиницях математичної моделі.
        double dt = 0.0002882737776307067;
        double duration = 57.654755526141344;
        if (!(dt > 0 && duration >= dt && duration / dt <= 600000)) { fputs("Потрібен додатний крок і від 1 до 600000 кроків. Зі зменшенням dt скоротіть тривалість.\n", stderr); return 1; }
        int steps = (int)round(duration / dt);
    
        // 3. Виділяємо масиви для початкового стану й кожного обчисленого кроку.
        double *t = calloc((size_t)steps + 1, sizeof(double));
        if (!t) { fputs("Недостатньо пам’яті.\n", stderr); return 1; }
        double *r = calloc((size_t)steps + 1, sizeof(double));
        if (!r) { fputs("Недостатньо пам’яті.\n", stderr); return 1; }
        r[0] = r_initial;
        double *theta = calloc((size_t)steps + 1, sizeof(double));
        if (!theta) { fputs("Недостатньо пам’яті.\n", stderr); return 1; }
        theta[0] = theta_initial;
        double *clock = calloc((size_t)steps + 1, sizeof(double));
        if (!clock) { fputs("Недостатньо пам’яті.\n", stderr); return 1; }
        clock[0] = clock_initial;
        int count = 1;
        for (int step_index = 0; step_index < steps; step_index++) {
            r[step_index + 1] = r[step_index] + dt * (((1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_1 * cos(1.0 * theta[step_index]) + (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_1 * sin(1.0 * theta[step_index])) * (1.0 * pow(r[step_index], 1.0) * (r[step_index] * r[step_index] - 1.0) / r[step_index]) + ((1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_2 * cos(2.0 * theta[step_index]) + (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_2 * sin(2.0 * theta[step_index])) * (2.0 * pow(r[step_index], 2.0) * (r[step_index] * r[step_index] - 1.0) / r[step_index]) + ((1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_3 * cos(3.0 * theta[step_index]) + (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_3 * sin(3.0 * theta[step_index])) * (3.0 * pow(r[step_index], 3.0) * (r[step_index] * r[step_index] - 1.0) / r[step_index]) + ((1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_4 * cos(4.0 * theta[step_index]) + (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_4 * sin(4.0 * theta[step_index])) * (4.0 * pow(r[step_index], 4.0) * (r[step_index] * r[step_index] - 1.0) / r[step_index]) + ((1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_5 * cos(5.0 * theta[step_index]) + (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_5 * sin(5.0 * theta[step_index])) * (5.0 * pow(r[step_index], 5.0) * (r[step_index] * r[step_index] - 1.0) / r[step_index]));
            theta[step_index + 1] = theta[step_index] + dt * (((2.0 * r[step_index] + (r[step_index] * r[step_index] - 1.0) * 1.0 / r[step_index]) * ((0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_1 * cos(1.0 * theta[step_index]) - (1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_1 * sin(1.0 * theta[step_index])) * pow(r[step_index], 1.0) + (2.0 * r[step_index] + (r[step_index] * r[step_index] - 1.0) * 2.0 / r[step_index]) * ((0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_2 * cos(2.0 * theta[step_index]) - (1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_2 * sin(2.0 * theta[step_index])) * pow(r[step_index], 2.0) + (2.0 * r[step_index] + (r[step_index] * r[step_index] - 1.0) * 3.0 / r[step_index]) * ((0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_3 * cos(3.0 * theta[step_index]) - (1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_3 * sin(3.0 * theta[step_index])) * pow(r[step_index], 3.0) + (2.0 * r[step_index] + (r[step_index] * r[step_index] - 1.0) * 4.0 / r[step_index]) * ((0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_4 * cos(4.0 * theta[step_index]) - (1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_4 * sin(4.0 * theta[step_index])) * pow(r[step_index], 4.0) + (2.0 * r[step_index] + (r[step_index] * r[step_index] - 1.0) * 5.0 / r[step_index]) * ((0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau))) * a_5 * cos(5.0 * theta[step_index]) - (1.0 - (0.5 + 0.5 * tanh(20.0 * tau * sin(2.0 * 3.141592653589793 * clock[step_index] / tau)))) * g_5 * sin(5.0 * theta[step_index])) * pow(r[step_index], 5.0)) / r[step_index]);
            clock[step_index + 1] = clock[step_index] + dt * (1.0);
            if (!(isfinite(r[step_index + 1]) && fabs(r[step_index + 1]) < 1e8 && isfinite(theta[step_index + 1]) && fabs(theta[step_index + 1]) < 1e8 && isfinite(clock[step_index + 1]) && fabs(clock[step_index + 1]) < 1e8)) {
                fputs("Обчислення зупинено через нескінченний, невизначений або завеликий стан. Зменште крок чи виберіть інші налаштування. Отримана ділянка не підтверджує обмеженість атрактора.\n", stderr);
                break;
            }
            t[step_index + 1] = (step_index + 1) * dt;
            count = count + 1;
        }
    
        // 4. Будуємо траєкторію. Зелена точка позначає початок, червона — кінець.
        FILE *file = fopen("interior-squirmer-trajectory.dat", "w");
        if (!file) { perror("файл траєкторії"); return 1; }
        for (int row = 0; row < count; row++) {
            fprintf(file, "%.17g %.17g %.17g\n", r[row], theta[row], clock[row]);
        }
        int write_failed = ferror(file);
        if (fclose(file) != 0) write_failed = 1;
        if (write_failed) return 1;
        // gnuplot має бути доступний через PATH. Для виведення SVG без дисплея задайте GNUTERM=svg.
        int plot_status = system("gnuplot -persist -e 'set title \"Внутрішня течія у моделі плавця — Blake / Ейлер\"; set xlabel \"r\"; set ylabel \"theta\"; set zlabel \"clock\"; set grid; set view equal xyz; stats \"interior-squirmer-trajectory.dat\" using 1 nooutput; last=STATS_records-1; splot \"interior-squirmer-trajectory.dat\" using 1:2:3 with lines title \"Траєкторія\", \"\" every ::0::0 using 1:2:3 with points pt 7 lc rgb \"green\" title \"Початок\", \"\" every ::last::last using 1:2:3 with points pt 7 lc rgb \"red\" title \"Кінець\"'");
        free(t);
        free(r);
        free(theta);
        free(clock);
        return plot_status == 0 ? 0 : 1;
    }
    

    Поза браузером

    Виберіть мову програмування й завантажте потрібні матеріали на сторінці завантажень. Вибрати мову програмування

    Ваш хаос має назву?

    Ми прагнемо зібрати всі генератори хаосу в одному відкритому каталозі й об’єднати людей, які досліджують хаос і нелінійну динаміку. Розробляєте власну систему? Надішліть рівняння, параметри, початковий стан, рекомендований метод і крок, посилання на працю та умови використання коду. Після перевірки додамо модель з вашим ім’ям і посиланням.

    Як запропонувати модель · Написати автору

    Коментарі

    Внутрішня течія у моделі плавця — Blake

    Рейтинг генераторів

    Добірки й покажчик · 420 моделей