Ok. This is weird. I am accustomed to taking the values of "WIDTH" and "HEIGHT" for granted. That is, they ought to be available and valid anywhere in my sketch after the size() call in setup(). That is right, isn't it?
Yet, today, Processing is putting repeatably bogus values in these pseudo-variables.
I've tried restarting Processing. I've stripped this down to the simplest possible test I can think of to demonstrate that WIDTH and HEIGHT are a) bogus immediately after calling size(), and b) also bogus within draw().
Any clues? Here's the code and the result:
1