How to make the ellipse size change when the ellipse locates toward the center??

You can calculate the distance to the center with

float d=dist(x,y,width/2,height/2);

and then use map() command

float diam = map(d,0,width,1,55);

use diam as 3rd and 4th parameters for ellipse

2 Likes