Particles in Max
My usual work environment for all things visual is Jitter in Max/MSP. To be honest though, it had been a fair amount of time since I’d tried to delve deeper into Jitter, as I was focusing on learning different software. I’ve recently gotten back into creating visuals and want to get my Max chops up to date. So I decided to follow along in building a particle system in Max/MSP using Jitter and Gen. While the concepts remain the same, the workflow and terminology in Max can be quite different, so I used the Amazing Max/MSP Tutorials on YouTube to help me understand some of the mathematics and semantics of using Gen by following along to their particle system tutorial. Max has its own native particle system, but seeing a particle system built from basic Max objects and some Gen code was useful for figuring out future abstractions. For now though, I implemented their particle system, added some color and trail tweaks. I also added a three spheres, the red sphere is an attractor and the two blue spheres repel.
----------begin_max5_patcher----------
4955.3oc6cksbqaiz9ZedJ3nJWk4bbH13xT0TkmGf4t+6RlxEsDsLSnH0PQc
VxT4c+mDMnLkDWZt.IRKUww9PpE13CMZznQ2e3+8oGV7R7282sv3eX7qFO7v
+6SO7f7V423A00OrXi22WF5sS91VD4+s3W98EeFdoT+umJu81h6DseSPTnep
7cyT2bqW5x2BhV+bh+xT3owLcez7yFVNl4+g35j+GJ8QSi+i5CErR9Mm8z9B
mV5qOdeZw2OQc2co+HzW9tKdevaJ8Ga8gG2hEG9dkBiehpMpZjOr30fP+u5m
rKHNpzW8CK71tszsenzGIGY98X4Wj8mObqfH3VrC2Jw+qAEed9g65kjAIoY3
w9DPz+ti0h2+ZhW4mDsOPJJvM+qOUHRkPQdNrYKgRBylJuxg8NJl0ctNLd4e
3KASyhaFu0OJHZah+N+nTuTkvc3kW4+p29vzmeMNJcWveJkOR9WdEu9qdK8q
8CG4sAZb+qj.uvhl2h0IAqhixEhif57aW739UChP1pDkaLx2Qj21J9vY5IYv
RMu3trF49cu3kj2S7BnqPKdwz33vieoCetP+WSUu71fnnSPwz3s0+hIAqeqg
O6KwYu3ll9tkuxtm2GAu5yYCASedm2WOFsS8BCUiIO9q+6dQAa7R8SCft.p4
gWzOxKqg91tkIwggG0dgW4qU7JqxThW5+sfUouIePkUFxd6AaKThVbnWdUvZ
+coGeu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