Henon吸引子是混沌与分形的著名例子.
相关软件:混沌数学及其软件模拟
相关代码:
// http://wenku.baidu.com/view/d51372a60029bd64783e2cc0.html?re=view
class HenonAttractor : public DifferentialEquation
{
public:
HenonAttractor()
{
m_StartX = 0.01f;
m_StartY = 0.01f;
m_StartZ = 0.0f; //m_ParamA = 1.28f;
//m_ParamB = 0.3f; m_ParamA = 1.28f;
m_ParamB = -0.985f; m_StepT = 0.01f;
} void Derivative(float x, float y, float z, float& dX, float& dY, float& dZ)
{
//dX = (1 - m_ParamA*x*x + y - x)/m_StepT;
//dY = (m_ParamB*x - y)/m_StepT;
//dZ = 0.0f; dX = ( - m_ParamA*x*x + m_ParamB*y /*- x*/)/m_StepT;
dY = (x - y)/m_StepT;
dZ = 0.0f;
} bool IsValidParamA() const {return true;}
bool IsValidParamB() const {return true;}
};
相关截图: