Its one big math problem with many many possible solutions, each dependant on what you want to accomplish with your code. Sometimes its easy to know what kind of code will solve your immediate problems without hindering the final destination. Other times, code can solve one problem but force you into a corner that wont allow reaching the goal. Read lots of code examples, modify it and understand what it does. Always ask yourself how that code you are reading might apply to your own projects.
Coding math , best series tutorial outside of Dan Shiffman in my opinion.
https://www.youtube.com/user/codingmath, although not aimed at processing, everything he teaches can easily be incorperated into processing, through the use of PVector, or just applied math and is not language specific.
If you look over the reference to the API, you will see a mix of things – there are a few trig terms, a number of mathematical operators, and a LOT of concepts from geometry.
If you had to pick one basic foundation area of math to explore – and you don’t have to pick just one! – it would probably be geometry, and basic linear algebra (vectors).
That said, creative coding can use any math. There are Processing forum posts and tutorials about:
context free grammars
fluid or softbody dynamics
These can use many different kinds of math – for example, the PeasyCam library implements a rotating camera uses quaternions.
A common thread for many examples is either perception or, more commonly, simulation. Some of the common forms of simulation – like collision detection / raycasting – get back to geometry and linear algebra in their implementation. Keep in mind that algorithms to approximate / compute equations are often quite different from mathematical equation solving and proofs – you might want to look at the actual code of parts of Processing and related libraries / examples / tutorials that you are interested in, in addition to reading about concepts.
Those are expert and learned responses. I had a minor aha moment once when I saw an equation with the Sigma(summation)and realized it was a for loop. The math equation is shorthand as is the code of a for loop.