StuckInBorland

05-10-2010, 06:11 AM

Hi

I have a polygon in 3d space and I want to draw an overlay on this polygon,I need to draw an overlay polygon about few pixels bigger than the polygon itself otherwise I won't see it.Easiest would be to scale it by about 1.2.

But how to calculate the coordinates for the new scaled polygon.

For each vertex if original coordinates were x,y,z what would be new x,y,z??

Well one solution is to find the center of the polygon and then to move each vertex acoording to the direction vector from polygon center.But this is painful - any simpler solutions?

Thanks a lot in advance

I have a polygon in 3d space and I want to draw an overlay on this polygon,I need to draw an overlay polygon about few pixels bigger than the polygon itself otherwise I won't see it.Easiest would be to scale it by about 1.2.

But how to calculate the coordinates for the new scaled polygon.

For each vertex if original coordinates were x,y,z what would be new x,y,z??

Well one solution is to find the center of the polygon and then to move each vertex acoording to the direction vector from polygon center.But this is painful - any simpler solutions?

Thanks a lot in advance