- #1
MaTHFRo
- 7
- 0
In a game I'm developing, I have an ellipse which contains a blue shape inside of it like follows:
http://img6.imageshack.us/img6/9518/screenshot20120815at938.png [Broken]
In the picture, the curves of the blue shape have the exact same arc as the area of the ellipse that it mirrors.
In this game, the blue shape can be stretched horizontally or vertically at any time. When it is stretched, I'd like for the enclosing ellipse to be able to increase in size so that it can fit the newly resized blue shape with the exact amount of border space around the blue shape as in the picture above. This seems like something that should be simple, yet I'm having so much trouble with it.
I've tried two things so far, increasing the size of the ellipse by the same proportion that the blue shape increased. Problem with this is the boundaries also will increase proportionally and will be small if the shapes are small and large if they're large.
I've also tried increasing the ellipse by the same amount as the blue shape. For instance if the blue shape is stretched by 5 pts, then I try to stretch the ellipse by 5 pts. Problem with this is eventually the blue shape out grows the ellipse.
So anyway, I was wondering how this could be done, if it's even possible. It seems like something that should be easy, but I just can't wrap my head around this...
Thanks,
MaTHFRo
http://img6.imageshack.us/img6/9518/screenshot20120815at938.png [Broken]
In the picture, the curves of the blue shape have the exact same arc as the area of the ellipse that it mirrors.
In this game, the blue shape can be stretched horizontally or vertically at any time. When it is stretched, I'd like for the enclosing ellipse to be able to increase in size so that it can fit the newly resized blue shape with the exact amount of border space around the blue shape as in the picture above. This seems like something that should be simple, yet I'm having so much trouble with it.
I've tried two things so far, increasing the size of the ellipse by the same proportion that the blue shape increased. Problem with this is the boundaries also will increase proportionally and will be small if the shapes are small and large if they're large.
I've also tried increasing the ellipse by the same amount as the blue shape. For instance if the blue shape is stretched by 5 pts, then I try to stretch the ellipse by 5 pts. Problem with this is eventually the blue shape out grows the ellipse.
So anyway, I was wondering how this could be done, if it's even possible. It seems like something that should be easy, but I just can't wrap my head around this...
Thanks,
MaTHFRo
Last edited by a moderator: