r/processing • u/Low_Evening_4719 • Dec 12 '23
Increasing/decreasing the size of moving objects with certain double digit numbers
I have created 2 pieces of code, 1 script increases the size of still shapes and the other has the code of 100 moving balls. I'm wanting to create a singular piece of code that;
for example when I type in the number "81" only one of the moving circles gets bigger. Is anyone able to help me out?
1
Upvotes
2
u/pqcf Dec 12 '23
Just as the X and Y positions of each ball in your 2nd script can change with each iteration, give each one a radius variable that also can change. Does this help?
2
u/gust334 Dec 13 '23
It is singularly hard to guess what is happening without seeing the relevant coding attempt.
1
u/pqcf Dec 12 '23
If you want to change the radius of select balls, seems to me each one will have to have its own radius variable. A selected ball, then, could have that value increment with each DRAW loop, as the others stay the same size, unless previously designated as a value to be incremented. Does that make any sense?