Variable to read an array of numbers in p5?

Hi,

Is there a reason why you are not using a formula?

Somthing like:

if (x <= 50) {
  y = 2 * x;
} else {
  y = - 2 * x + 200
}
2 Likes