Say I have a shape like this:
And I want to scale it down to this:
How do I calculate the location of the points (red circles) to do so?
new.x = scale * (old.x - center.x) + center.x
new.y = scale * (old.y - center.y) + center.y
Repeat for each point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With