p5.ten

p5.ten

A p5.js addon library for computing with tensors

Build Status

Usage

Tensors

View the matrix-vector example.

const a = createTensor([[1, 2], [3, 4]]);
const x = createTensor([5, 6]);
const b = a.dot(x);

b.print();

Demo

The fluid simulation below was created using a 2-dimensional lattice Boltzmann method.

A fluid simulation

Generated using TypeDoc