Missing Trail of Growing Circle

Hello, I use processing for some hobby drawing. Today while doing such a thing I faced a weird situation. I have a circle that will grow as time passes on, in draw() I did not use any background() call, so this growing circle should leave a trail, right? but that doesn’t happen. Here’s my code (run in Processing 3.5.4)

float r = 20;
void setup(){
	size(720, 720);
	background(255);
}

void draw(){
	ellipse(width/2, height/2, r, r);
	r += 1;
}

When I modify this code for shrinking (i.e. make r initially big and decrease by 1 every draw) the trail is there. Why is the trail missing for the case of growing? I can’t find any logical answer.

1 Like

Hello,

Get to know the resources available to you.

Resources < Click here to expand !

I encourage you to review the resources available here:

The ellipse is filled by default so it will overlay the rings below if you go from small to large; try reversing the order and see what happens.

Also consider that stroke() (black) and fill() (white) are on by default.

Explore the references:

And look down at the related functions noFill(), stroke(), noStroke.

This is what I get with noFill() and I modified the strokeWeight() and spacing of r.

image

:)

2 Likes

Thanks, I thought noFill() was on by default. Thanks for clearing it.

Clearing the circle or clearing your understanding of it?
I got a chuckle reading that …

:)