I have many circles positioned randomly in my processing program. Each one is initiated as so:
ellipse(x, y, radius, radius);
I was wondering if I could somehow specify an z-index value for each circle. Circles of higher z-indices display over those of lower ones.
I cannot test this right now but I believe you should look at thefill()method. The fourth parameter in this function specifies opacity (AKA alpha transparency). It is described at Processing.org/learning/color.EDIT: This thread on drawing order seems to ask the same question as yours. Playing around with the image transparency is suggested, but it seems like a better answer is to utilize the Processing Layar Library. Here are some examples – the first one appears to be along the lines of your question.
Quoting the Advanced section of the Layers examples: