nick2price

04-26-2009, 04:51 PM

Just doing some revision for computer graphics and have a mathematical question.

Scale the line p1p2 around the centre of the line.

p1=[10,20]

p2=[100,150]

Scaling factor = [0.4, 0.6]

Around the origina is easy, just a case of

p1'=[10*0.4 OVER 20*0.6] = [4 OVER 12]

p2'=[100*0.4 OVER 150*0.6] = [40 OVER 90]

I just cant work out how to do it around the center of the line. If anyone knows what i am on about, any advise appreciated.

cheers

Scale the line p1p2 around the centre of the line.

p1=[10,20]

p2=[100,150]

Scaling factor = [0.4, 0.6]

Around the origina is easy, just a case of

p1'=[10*0.4 OVER 20*0.6] = [4 OVER 12]

p2'=[100*0.4 OVER 150*0.6] = [40 OVER 90]

I just cant work out how to do it around the center of the line. If anyone knows what i am on about, any advise appreciated.

cheers