first of all i want to indicate that i am new to processing, so that if your replies could be detailed as a newbie can understand, i will be glad :)
secondly; i am thinking about putting this script into grasshopper add-on of rhino, which i heard that processing and grasshopper can work together, but i don't know how to apply it. or it is possible to create my idea in grasshopper and use processing when it is needed.
i want to have a growth algorithm for boxes, which will randomly place a defined number of big boxes to my working space. then around these big boxes, a random number from a defined range of middle boxes will randomly placed. as a last step, around these middle size boxes, there will be random small boxes like the rule of middle boxes.
but main point is any of the boxes should not intersect any other, i should add an if-then conditional to this definiton as: "if one of the boxes intersects the other one, move the other one x far from the first one". Also the size reduction between boxes should have a parametrical expression such as "x>y>z, x=2y=4z" which the ratio or the decreasing method is not so important, the thing is they should go smaller in a manner.
i am adding an diagram to make my statement clear.