using namespace std const double sig 10 const double rho 28 const doub

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using namespace std;
const double sig = 10.0;
const double rho = 28.0;
const double bet = 8.0/3.0;
struct Point {
double x;
double y;
double z;
};
Point lorenz (Point point,double step,double sig,double rho,double bet, double noise )
{
return Point{
point.x + step * ( noise + ( sig*(point.y - point.x) )) ,
point.y + step * (noise + ( point.x *(rho - point.z) - point.y )) ,
point.z + step * (noise +( point.y * point.x - bet * point.z )) ,
};
}