A friendly and intuitive math library for p5.js
This addon library for p5.js turns the "software sketchbook" into a beginner-friendly environment for technical computing. It provides the following features:
The library is written in TypeScript and uses TensorFlow.js and tidy.js under the hood. It bundles p5.ten, p5.tidy, TurtleGFX.
View the Mauna Loa example.
let data;
function preload() {
data = loadTable('co2.csv', 'csv', 'header');
}
function setup() {
noCanvas()
tidy(
data,
filter((d) => d.mean > 400),
debug('Observations greater than 400ppm CO2'),
);
}
View the matrix-vector example.
const a = createTensor([[1, 2], [3, 4]]);
const x = createTensor([5, 6]);
const b = a.dot(x);
b.print();
The fluid simulation below was created using a 2-dimensional lattice Boltzmann method.
See CONTRIBUTING.
Thanks goes to these wonderful people (emoji key):
Ashneel Das 💻 ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
Generated using TypeDoc