Can I create points on polygon with specific distance between them?

조회 수: 9 (최근 30일)
Can someone help to make function to create points with specific distanace from each other on a polygon made of points in XY-plane with random distance between them.
for example: if I have the blue polygon made of X and Y point (file attached) as in the pictures1, can I create points (red) in as in picture 2. with distance D between them?
Picture 1
Picture 2

채택된 답변

Image Analyst
Image Analyst 2019년 2월 16일
This is what interparc does. See John D'Errico's File Exchange: interparc
  댓글 수: 7
John D'Errico
John D'Errico 2019년 2월 17일
I'll admit to being lazy. :) It saves a lot of time.
Faez Alkadi
Faez Alkadi 2019년 2월 17일
well, if you say so ,master :)

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

추가 답변 (1개)

Kevin Phung
Kevin Phung 2019년 2월 16일
편집: Kevin Phung 2019년 2월 16일
depends if your y values are equally spaced in the first place.
Is this an appropriate workaround?:
% add this to your plot
hold on;
spacing= 10;
plot(xy(1:spacing:end,1),xy(1:spacing:end,2),'ro');
this is spacing the distance between each index used rather than the actual distance
  댓글 수: 1
Faez Alkadi
Faez Alkadi 2019년 2월 16일
편집: Faez Alkadi 2019년 2월 16일
What I'm looking for is the actual distance!!!
Thank you though

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

카테고리

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