#8 - The Thomas Attractor

img of #8 - The Thomas Attractor

In the dynamical systems theory, Thomas’ cyclically symmetric attractor is a 3D strange attractor originally proposed by René Thomas. It has a simple form which is cyclically symmetric in the x,y, and z variables and can be viewed as the trajectory of a frictionally dampened particle moving in a 3D lattice of forces. The simple form has made it a popular example.

The algorithm

thomas-attractor.js
const b = 0.19;

const next = (x,y,z) => {
  const dx = -b * x + Math.sin(y);
  const dy = -b * y + Math.sin(z);
  const dz = -b * z + Math.sin(x);
  return {dx,dy,dz};
};

References

Fork