Scaling vectors from a center point?

Posted by user146780 on Stack Overflow See other posts from Stack Overflow or by user146780
Published on 2010-05-06T18:14:37Z Indexed on 2010/05/06 18:18 UTC
Read the original article Hit count: 156

Filed under:
|

I'm trying to figure out if I have points that make for example a square:

 *     *



 *     *

and let's say I know the center of this square. I want a formula that will make it for eample twice its size but from the center

 *               *

      *     *



       *     *


  *                *

Therefore the new shape is twice as large and from the center of the polygon. It has to work for any shape not just squares.

I'm looking more for the theory behind it more than the implementation.

Thanks

© Stack Overflow or respective owner

Related posts about vector

Related posts about algorithm