I followed this tutorial, btw: https://youtu.be/YM_7YpV95V8
p5.js Coding Tutorial | Lorenz Attractor

YouTube