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

9 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Image Analyst
Image Analyst am 16 Feb. 2019
This is what interparc does. See John D'Errico's File Exchange: interparc
  7 Kommentare
John D'Errico
John D'Errico am 17 Feb. 2019
I'll admit to being lazy. :) It saves a lot of time.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Kevin Phung
Kevin Phung am 16 Feb. 2019
Bearbeitet: Kevin Phung am 16 Feb. 2019
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 Kommentar
Faez Alkadi
Faez Alkadi am 16 Feb. 2019
Bearbeitet: Faez Alkadi am 16 Feb. 2019
What I'm looking for is the actual distance!!!
Thank you though

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Elementary Polygons finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by