how to use a polybuffer without changing the polygon's shape?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1049765/image.png)
This is what i want. I want the polybuffer to be as same shape as a polygon.
Thanks.
0 comentarios
Respuestas (1)
Matt J
el 29 de Jun. de 2022
use scale
2 comentarios
Matt J
el 30 de Jun. de 2022
Editada: Matt J
el 30 de Jun. de 2022
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)
Ver también
Categorías
Más información sobre Elementary Polygons en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!