Beginning of the year, I started seriously studying object oriented programming and being a complete beginner it has been quiet a journey. Processing has been my true friend and will always be. I have covered a post here on why processing is your best friend if you are starting to study how to code here
Off lately, I started a bit deep diving in processing. Thanks to awesome tutorials by Daniel Shiffman. I bought his Nature of code book. Check it out here and support him by buying his awesome book He also has accompanying videos here I was super fascinated when I started reading about particle systems and I decided to take input from Kinect and implement the particle system code. The logic is to calculate the depth Values using the depth Map and draw particles using the Particle System class.
This line of code draws the continuous particle system,
particles.add(new Particle(new PVector(closestX, closestY)));
Also, I continuously remove the particles from the for loop to prevent the sketch to slow down due to ArrayList to grow infinitely however still I have noticed that the code runs a lot slower. Maybe its time, that I eventually switch to openFrameworks BUT ill always be loyal to Processing. What the heck, I am still a beginner and if you can make this code a lot better, do collaborate and teach me ways to make it more smoother. Thats about it, I hope you enjoy playing with the code. Oh btw! this was my first Kinect sketch with processing
Here is the gitHub link for downloading the code – https://github.com/Shreekazoid/Kinect_Depth_ParticleSystem