// The simple method variableEllipse() was created specifically
// for this program. It calculates the speed of the mouse
// and draws a small ellipse if the mouse is moving slowly
// and draws a large ellipse if the mouse is moving quickly
void variableEllipse(int x, int y, int px, int py)
{
float speed = abs(x-px) + abs(y-py);
stroke(speed);
ellipse(x, y, speed, speed);
}
i would like to make this function only work when the mouse is pressed... i tried a couple things, an if statement and just using the mousePressed fuction... but i don't think i understand how to implement this, is it a function that calls up the original function? or is it much easier than this?
once again, i apologize, i am a total beginner, i bought a book, and have messed around a bit... thanks in advance