Sections of Mathematics to learning for art coding

Dear passengers,

Can you describe me, please, what section of Math (like a trigonometry or discrete math or w.e.) I need to learn for good and deep understanding of art of coding on Processing?

It’s not a problem to learn a syntax for me. But, I’m really need a math workouts in a context of Creative Coding.

Some books, videos?
Thank you!

1 Like

I think there are so many ways of generating Art by programming that there is not one section of math to learn

see https://en.wikipedia.org/wiki/Generative_art

2 Likes

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.

1 Like

Yes, I do it. But this does not contradict my desire to study the basic foundations of mathematics that I can apply Processing coding. So… what section of math is good for learning in this case?

JUST one example could be:
understand this
https://processing.org/reference/environment/#Coordinates
processing basics,
to use

with the learning of

and use the examples

and tutorial

or video
https://www.youtube.com/watch?v=7nTLzLf7jUg .


should be fun

2 Likes

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.

3 Likes

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
  • machine learning
  • cellular automata
  • signal processing
  • computer vision
  • collision detection
  • raycasting
  • wave collapse
  • 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.

Hope that was helpful.

4 Likes

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.

2 Likes

There is a math section in the reference. Make yourself familiar with all examples there.

In the tutorials section check trigonometry primer and vectors, also arrays and two dimensional arrays. Of course the first three of the textual (!) tutorials are helpful.

Then in the examples there is swarm / boids. Maths is relatively simple there, it’s more how the rules play out. Definitely worth looking at.

Same goes for game of life.

As I said, it depends of the kind of Art you are looking for. Eg. Mandelbrot set / Julia set is very complicated and won’t help you in other fields.

Also Lorenz Attractor is complicated.

Also Fibonacci is nice, eg the curve.

Also check the principle of recursion, although not strictly maths.

See codes at (also English) http://www.generative-gestaltung.de/1/

See also: https://github.com/Kango/MathProjects/wiki/Math-Projects

3 Likes