loom
1import "diff/LorenzSystem.diff" type LorenzSystem;
2
3LorenzSystem LS1;
4LorenzSystem LS2;
5
6LS1.sigma = 10;
7LS1.b = 8/3;
8LS1.R = 29;
9
10LS1.x = 10;
11LS1.y = 1;
12LS1.z = 1;
13
14LS2.sigma = 9;
15LS2.b = 7/3;
16LS2.R = 25;
17
18LS2.x = 10;
19LS2.y = 1;
20LS2.z = 1;
21
22graph3d.init("Аттрактор Лоренца");
23graph3d.addSeries("1", graph3d.Mesh.Sphere);
24graph3d.addSeries("2", graph3d.Mesh.Pyramid);
25graph3d.setPointsCount("1", 500);
26graph3d.setPointsCount("2", 500);
27
28void onShow()
29{
30graph3d.addPoint("1", LS1.x, LS1.y, LS1.z);
31graph3d.addPoint("2", LS2.x, LS2.y, LS2.z);
32}
33
34scene.setIterationCallback(onShow, 10);
35scene.setT(0.0);
36scene.setTk(150.0);
37scene.setDt(0.001);
38
39scene.add(LS1);
40scene.add(LS2);
41
42scene.start();
43