loom
1import "diff/LorenzSystem.diff" type LorenzSystem;
2
3LorenzSystem lorenz = {
4sigma : 10,
5b : 8/3,
6R : 28,
7
8x : 1,
9y : 1,
10z : 1,
11};
12
13graph3d.init("Аттрактор Лоренца");
14graph3d.addSeries("1", graph3d.Mesh.Sphere);
15graph3d.setPointsCount("1", 0);
16
17void onShow()
18{
19graph3d.addPoint("1", lorenz.x, lorenz.y, lorenz.z);
20}
21
22scene.setIterationCallback(onShow, 1);
23scene.setRealtimeModeEnabled(true);
24scene.setT(0.0);
25scene.setTk(100.0);
26scene.setDt(0.01);
27
28scene.add(lorenz);
29
30scene.start();
31