# Offset polygon draw

조회 수: 8(최근 30일)
Tanvir Faisal 2011년 6월 18일
답변: Steven 2018년 11월 14일
Hi, I am working with Voronoi. However, I need to draw offset polygon. In my case, it will be negative offset polygon (the inner polygon will shrink). Can any one help me out. I tried, but did not get it. I am trying to provide the the coordinates of the original polygon and amount of offset (it may be positive for expansion and negative value for contraction). My case, the polygon is arbitrary shaped, i.e. it can be of any number of sides but of course convex polygon. I will appreciate if someone can help me out.
Thanks, Tanvir

댓글을 달려면 로그인하십시오.

### 답변(2개)

Razvan Sencu 2013년 3월 13일
Hi,
Did you find your answer? I'll be interested in offseting some polygons as well.
Thanks, Razvan
##### 댓글 수: 0표시숨기기 이전 댓글 수: -1

댓글을 달려면 로그인하십시오.

Steven 2018년 11월 14일
for ii = [0 1 3]
xoff = ii;
yoff = 1;
t = 0.05:0.01:2*pi;
x1 = avgdistbig*cos(t)+xoff;
y1 = avgdistbig*sin(t)+yoff;
pgon = polyshape(x1,y1);
hold on;plot(pgon)
end

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by