Animating the scale of an object relative to its center


In this example the circle is centered at 0,0 and rescaled, so that the center remains unaffected. It is then placed inside a <g> that then translates it back to the center of the screen. In this example the circle is centered at 50,50 and then rescaled. Its center is affected by the scaling. We therefore have to compensate by animating the translation to adjust the distortion.