Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
jcponce committed Aug 1, 2024
1 parent 0ade8ec commit f532b29
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions threejs/attractors/attractors/lorenz-variation.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* Lorenz Attractor modified
* Lorenz Attractor variation
*/
const initialParams = {
Attractor: "Lorenz modified",
Attractor: "Lorenz variation",
sigma: 10,
rho: 28,
beta: 8 / 3,
};

const params = { ...initialParams };

let lorenzAttractorModified = (x, y, z) => {
let lorenzAttractorVariation = (x, y, z) => {
const { sigma, rho, beta } = params;

const dx = (sigma * (y - x) + (sin(y / 5) * sin(z / 5) * 200)) * .65;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ resetInitialPositions();
const animate = () => {
for (let i = 0; i < count; i++) {
const { x, y, z } = initialPositions[i];
const { dx, dy, dz } = lorenzAttractorModified(x, y, z);
const { dx, dy, dz } = lorenzAttractorVariation(x, y, z);

initialPositions[i].x += dx * dt;
initialPositions[i].y += dy * dt;
Expand Down

0 comments on commit f532b29

Please sign in to comment.