Changing the ellipses size with the movement of the mouse (scale a shape)

you need to use radius1 or radius2

try

// increase
radius1 = map (mouseX,
0,width,
0, 4);

translate(width/2, height/2); 
scale(radius1);

// in the ellipse commands replace mouseX,mouseY where it is used as position by `0,0`

1 Like

That just made everything way to big

Hi

You can draw your ellipse like this as @Chrisir made


int logoSize = 25;
float radius1;
void setup() {
  size(500, 500);
  ellipseMode(CENTER);
}

void draw() {
  background(255);
  strokeWeight(20);

  radius1 =map (mouseX, 0, width, 0, 4);
  //translate  (width/2, height/2);

  noFill();

  ellipse(0, 0, logoSize+50+378, logoSize-50+378);
  ellipse(0, -60, logoSize-50+378, logoSize-175+378);
  ellipse(0, 0, logoSize-175+378, logoSize-50+378);
}

Unmarked this line to make the ellipse become in the center
//translate (width/2, height/2);
Screenshot_2023-06-05-22-52-47-467

Scale enable you to zoom in/out your logo

Then scale radius1

Note that this is all @Chrisir idea thanks Alot for him

Read @Chrisir’s last post

1 Like

I know

Reduce 4 to 2 for example in the map() command

1 Like