跳至正文
CHAOS HOUSE

每个混沌发生器都应有自己的家!

Chaos House 是怎样诞生的

写学位论文时,我尝试对约 84 种模拟混沌发生器进行分类。每一种发生器的动力学都可以用一组常微分方程来描述。那时我已经知道,这类发生器远不止这些。论文里收录的是我当时能找到资料的那些。

为了看清一个发生器在不同参数下会有怎样的表现,我把几间教学机房里的计算机连成一个网络,让各个处理器核心分别计算不同的参数组合。即使所有核心同时运算,为一个发生器绘制一张参数图仍要花上好几个星期。

我希望有一本图集,也能收录那些我当年没能找到资料的发生器。如今,有了高性能显卡和服务器,计算一张参数图所需的时间大大缩短了。在 Chaos House,你可以在图上选一个点,看看对应的轨迹,再改变一个系数,观察运动会如何变化。

我希望这本图集能收录所有已知的混沌发生器,也让研究它们的人有机会相识。或许你知道一个尚未收录的系统,或者在熟悉的发生器里发现了有趣的动力学行为。欢迎分享方程和参数,让其他人也能重现你的实验。

如何提交模型

交替涡旋映射 — Aref

评论

搜索与筛选

代码
外观

正在连接档案…

轨道参数与来源

rₙ₊₁ = ρ²+η²+2·ρ·η·cos(q)
θₙ₊₁ = atan2(ρ·sin(q),η+ρ·cos(q))
sideₙ₊₁ = −side
q−factor·sin(q) = angle−factor·sin(angle)+(γ·t·(1−lambda_(squared)))/(2·π·ρ²·(1+lambda_(squared)))
vortex_(b) = b·side
image_(b) = (a²)/(vortex_(b))
lambda_(squared) = (vortex_(b)²+r²−2·vortex_(b)·r·cos(θ))/(image_(b)²+r²−2·image_(b)·r·cos(θ))
η = (vortex_(b)−lambda_(squared)·image_(b))/(1−lambda_(squared))
ρ = |(lambda_(squared)·(image_(b)−vortex_(b)))/(1−lambda_(squared))|
angle = atan2(r·sin(θ),r·cos(θ)−η)
factor = (2·lambda_(squared))/(1+lambda_(squared))
rₙ₊₁ = ρ²+η²+2·ρ·η·cos(q)
θₙ₊₁ = atan2(ρ·sin(q),η+ρ·cos(q))
sideₙ₊₁ = −side
q−factor·sin(q) = angle−factor·sin(angle)+(γ·t·(1−lambda_(squared)))/(2·π·ρ²·(1+lambda_(squared)))
vortex_(b) = b·side
image_(b) = (a²)/(vortex_(b))
lambda_(squared) = (vortex_(b)²+r²−2·vortex_(b)·r·cos(θ))/(image_(b)²+r²−2·image_(b)·r·cos(θ))
η = (vortex_(b)−lambda_(squared)·image_(b))/(1−lambda_(squared))
ρ = |(lambda_(squared)·(image_(b)−vortex_(b)))/(1−lambda_(squared))|
angle = atan2(r·sin(θ),r·cos(θ)−η)
factor = (2·lambda_(squared))/(1+lambda_(squared))

    频谱与分布设置
    代码与下载

    blinking-vortex-map / root_recurrence.c

    交替涡旋离散映射。每次迭代都在包围根的区间内用二分法求解严格单调的角度方程。

    // 交替涡旋映射 — Aref | Chaos House 2026.11.25-readable.6
    // 来源: https://doi.org/10.1017/s0022112084001233
    // 原始坐标。参阅 README.txt 和随附的源代码许可证。
    // 交替涡旋离散映射。每次迭代都在包围根的区间内用二分法求解严格单调的角度方程。
    #include <math.h>
    #include <stdio.h>
    #include <stdlib.h>
    int main(void)
    {
    
        // 1. 参数与初始条件。
        double a = 1.0;
        double gamma = 1.0;
        double b = 0.5;
        double advection_time = 1.5;
        double r_initial = 0.17;
        double theta_initial = 0.33;
        double side_initial = 1.0;
    
        // 2. 时间设置。时间以数学模型的单位计量。
        int steps = 2000;
    
        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; }
        double *theta = calloc((size_t)steps + 1, sizeof(double));
        if (!theta) { fputs("内存不足。\n", stderr); return 1; }
        double *side = calloc((size_t)steps + 1, sizeof(double));
        if (!side) { fputs("内存不足。\n", stderr); return 1; }
        r[0] = r_initial;
        theta[0] = theta_initial;
        side[0] = side_initial;
        int count = 1;
        // 3. 迭代映射。只有 side 改变符号,参数 b 保持不变。
        for (int step_index = 0; step_index < steps + 0; step_index++) {
            double vortex_b = b * side[step_index];
            double image_b = a * a / vortex_b;
            double lambda_squared = (vortex_b * vortex_b + r[step_index] * r[step_index] - 2.0 * vortex_b * r[step_index] * cos(theta[step_index])) / (image_b * image_b + r[step_index] * r[step_index] - 2.0 * image_b * r[step_index] * cos(theta[step_index]));
            if (!(((fabs(fabs(side[step_index]) - 1.0) < 1e-12) && (fabs(b) > 0.0) && (a > fabs(b)) && (r[step_index] > 0.0) && (r[step_index] < a) && (lambda_squared > 0.0) && (lambda_squared < 1.0)))) { fputs("要求 side = +/-1、0 < abs(b) < a,且 0 < r < a 并位于非退化流线上。\n", stderr); return 1; }
            double lambda_value = sqrt(lambda_squared);
            double eta = (vortex_b - lambda_squared * image_b) / (1.0 - lambda_squared);
            double rho = fabs(lambda_value / (1.0 - lambda_squared) * (image_b - vortex_b));
            double angle = atan2(r[step_index] * sin(theta[step_index]), r[step_index] * cos(theta[step_index]) - eta);
            double factor = 2.0 * lambda_value / (1.0 + lambda_squared);
            double target = angle - factor * sin(angle) + gamma * advection_time * (1.0 - lambda_squared) / (2.0 * 3.141592653589793 * rho * rho * (1.0 + lambda_squared));
            double lower = target - factor - 1e-12;
            double upper = target + factor + 1e-12;
            // 方程严格单调,所选区间可确保包含根。
            for (int root_iteration = 0; root_iteration < 64; root_iteration++) {
                double middle = (lower + upper) / 2;
                if (middle - factor * sin(middle) < target) {
                    lower = middle;
                } else {
                    upper = middle;
                }
            }
            double next_angle = (lower + upper) / 2;
            r[step_index + 1] = sqrt(fmax(0.0, rho * rho + eta * eta + 2.0 * rho * eta * cos(next_angle)));
            theta[step_index + 1] = atan2(rho * sin(next_angle), eta + rho * cos(next_angle));
            side[step_index + 1] = -side[step_index];
            if (!(isfinite(r[step_index + 1]) && fabs(r[step_index + 1]) < 1e8 && isfinite(theta[step_index + 1]) && fabs(theta[step_index + 1]) < 1e8 && isfinite(side[step_index + 1]) && fabs(side[step_index + 1]) < 1e8)) {
                fputs("状态非有限或数值过大,计算已停止。请减小步长或更换预设。已绘的轨迹片段不足以确认存在有界吸引子。\n", stderr);
                break;
            }
            t[step_index + 1] = step_index + 1;
            count = count + 1;
        }
    
        // 4. 绘制轨迹。绿色为起点,红色为终点。
        FILE *file = fopen("blinking-vortex-map-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], side[row]);
        }
        int write_failed = ferror(file);
        if (fclose(file) != 0) write_failed = 1;
        if (write_failed) return 1;
        // 需要在 PATH 中安装 gnuplot。无显示器时设置 GNUTERM=svg 以输出 SVG。
        int plot_status = system("gnuplot -persist -e 'set title \"交替涡旋映射 — Aref / 带求根的离散迭代\"; set xlabel \"r\"; set ylabel \"theta\"; set zlabel \"side\"; set grid; set view equal xyz; stats \"blinking-vortex-map-trajectory.dat\" using 1 nooutput; last=STATS_records-1; splot \"blinking-vortex-map-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(side);
        return plot_status == 0 ? 0 : 1;
    }
    

    在浏览器之外

    在下载页选择编程语言并下载所需资料。 选择编程语言

    你的混沌系统有名字吗?

    我们希望把世界上所有的混沌发生器收录在一个开放目录中,让研究混沌与非线性动力学的人们汇聚成一个社群。 正在开发自己的系统?请提供方程、参数、初始状态、推荐算法和步长、参考文献及代码使用许可。审查通过后,我们会署上您的姓名并附上链接。

    如何提交模型 · 写信给作者

    评论

    交替涡旋映射 — Aref

    发生器人气排行

    专题与索引 · 420 个模型