how to use a polybuffer without changing the polygon's shape?

조회 수: 10 (최근 30일)
Sierra
Sierra 2022년 6월 29일
편집: Matt J 2022년 6월 30일
I've used polybuffer. but when the d(distance) is a largen number, the buffer is someting like circle(round).
so I used sqaure too, but it retunred hexagon, not a rectangular even i made a polygon with 4 coordinates.
This is what i want. I want the polybuffer to be as same shape as a polygon.
Thanks.

답변 (1개)

Matt J
Matt J 2022년 6월 29일
use scale
  댓글 수: 2
Sierra
Sierra 2022년 6월 29일
I tried scale. but unfortunately the result is not what i wanted.
I want to use polybuffer like second image.
Thanks Matt J
Matt J
Matt J 2022년 6월 30일
편집: Matt J 2022년 6월 30일
In what way is the result "not what you wanted" and what code produced that result? If you want the expansion centered around the centroid of the polyshape, specify a 3rd argument to the scale() command.
p=nsidedpoly(4);
[cx,cy]=centroid(p);
p(2)=scale(p,2,[cx,cy]);
plot(p)

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

카테고리

Help CenterFile Exchange에서 Elementary Polygons에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by