xxxxxxxxxx
16
let expressionsSets;
function setup() {
expressionsSets = [
new ExpressionsSet()
.add(new Expression().define(x => 2 * x).smooth(10).style({width: 5, color: "#E5E"}))
.add(new Expression().define(x => x * x).smooth(10).style({width: 5, color: "#E55"}))
.add(new Expression().define(x => cos(x) + 1).smooth(10).style({width: 5, color: "#5E5"}))
];
createCanvas(960, 540);
}
function draw() {
background("#111");
expressionsSets.forEach(expressionsSet => expressionsSet.display(0, 3, 0, width, 0, 9, height, 0));
}