Processing code into p5.js code

This question is different from the one in the original topic. I moved these messages to a new topic.