How to use the @mathigon/fermat.lerp function in @mathigon/fermat

To help you get started, we’ve selected a few @mathigon/fermat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathigon / textbooks / content / polyhedra / functions.ts View on Github external
function update(n: number) {
      cube.scale.setScalar(lerp(1.67, 0.95, n / 100));
      octahedron.scale.setScalar(lerp(0.83, 1.43, n / 100));
      scene.draw();
    }
github mathigon / textbooks / content / graph-theory / functions.ts View on Github external
graph.arrange(graph.vertices.map((v, i) => {
        return {
          x: lerp(from[i].x, to[i].x, q),
          y: lerp(from[i].y, to[i].y, q)
        };
      }));
    }, 800);
github mathigon / textbooks / content / polyhedra / functions.ts View on Github external
function update(n: number) {
      cube.scale.setScalar(lerp(1.67, 0.95, n / 100));
      octahedron.scale.setScalar(lerp(0.83, 1.43, n / 100));
      scene.draw();
    }
github mathigon / textbooks / content / polyhedra / functions.ts View on Github external
function update(n: number) {
      dodecahedron.scale.setScalar(lerp(1.88, 1.48, n / 100));
      icosahedron.scale.setScalar(lerp(1.35, 1.7, n / 100));
      scene.draw();
    }
github mathigon / textbooks / content / graph-theory / functions.ts View on Github external
graph.arrange(graph.vertices.map((v, i) => {
        return {
          x: lerp(from[i].x, to[i].x, q),
          y: lerp(from[i].y, to[i].y, q)
        };
      }));
    }, 800);
github mathigon / textbooks / content / polyhedra / functions.ts View on Github external
function update(n: number) {
      dodecahedron.scale.setScalar(lerp(1.88, 1.48, n / 100));
      icosahedron.scale.setScalar(lerp(1.35, 1.7, n / 100));
      scene.draw();
    }