Problems with converting a P5.js sketch to Processing

Hello,

There are resources here:
processing.org

Check out the Simulate examples.
I had a lot of fun dissecting this code and understanding it and now have some cool projects!

Nature of Code also includes particles simulations:
The Nature of Code

This may help:
Processing transition · processing/p5.js Wiki · GitHub

I suggest you glean insight from the examples and work on your own simulation or particle system… when you are ready.

:)