15,617,116 members
1.00/5 (1 vote)
See more:
Hi,

I'm trying to do an Offset function from a polygon.
The main polygon that I have to offset is somethings like this:

______________________
| |
| |
| |
_____| |
| |
| |
| |
|___________________________|

Can someone help me or send me where I can find help?

Appreciate the help.
Posted
Updated 10-Jun-10 22:14pm
v7
Comments
Fredrik Bornander 10-Jun-10 11:08am
I'm not sure what you're asking for, can you elaborate the question a bit?
Perhaps provide an example of what you're trying to calculate?
Stephen Hewitt 10-Jun-10 22:24pm
Reason for my vote of 1
What's the question? Some specifics would help!
Stephen Hewitt 11-Jun-10 10:25am
Explain some details:
What programming language?
What libraries, if any are you using? OpenGL, DirectX, nothing?
How are you representing the polygons?

Give us something to work with!

## Solution 3

Depending on what your Polygon is (Image, Array of Point etc....) you might be able to use a Matrix Translation. If so Matrix Transformation of Images in C#, using .NET GDI+[^] might be of some use.

Comments
Albin Abel 16-Feb-11 23:56pm
I am also thinking he refer offset as translation. My 5

## Solution 1

Perhaps if you explain what you're trying to do...

## Solution 2

To offset the polygon, all you have to to is add the offset, in required dimension, to each vertex/coordinate.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Top Experts
Last 24hrsThis month
 OriginalGriff 105 Richard MacCutchan 30 merano99 20 Graeme_Grant 10 Member 15967937 10
 OriginalGriff 65 Richard MacCutchan 30 merano99 20 Graeme_Grant 10 Member 15967937 10

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900