Main Content

alphaSpectrum

고유한 알파 셰이프를 제공하는 알파 값

설명

예제

a = alphaSpectrum(shp)는 고유한 알파 셰이프를 생성하는 알파 반지름의 값들을 반환합니다. a는 내림차순으로 정렬됩니다. a의 각 요소는 고유한 셰이프가 생성되는 알파 반지름의 값을 나타냅니다. a의 길이는 고유한 셰이프의 개수와 같습니다. 알파 값들이 a의 값들 사이에 있으면 고유한 알파 셰이프가 생성되지 않습니다.

예제

모두 축소

2차원 점 집합을 만들고 플로팅합니다.

th = (pi/12:pi/12:2*pi)';
x1 = [reshape(cos(th)*(1:5), numel(cos(th)*(1:5)),1); 0];
y1 = [reshape(sin(th)*(1:5), numel(sin(th)*(1:5)),1); 0];
x = [x1; x1+15;];
y = [y1; y1];
plot(x,y,'.')
axis equal

Figure contains an axes object. The axes contains a line object which displays its values using only markers.

디폴트 알파 반지름을 사용하여 포인트 클라우드에 대한 알파 셰이프를 만듭니다.

shp = alphaShape(x,y);

포인트 클라우드의 고유한 알파 셰이프를 생성하는 임계 알파 값의 스펙트럼을 구합니다.

alphaspec = alphaSpectrum(shp);

스펙트럼에서 알파 값에 의해 생성된 고유한 알파 셰이프 4개를 플로팅합니다.

for k = 1:4
    alpha = alphaspec(8*k-7); 
    shp.Alpha = alpha; 
    subplot(2,2,k)
    plot(shp)
    title("Alpha = "+alpha)
end

Figure contains 4 axes objects. Axes object 1 with title Alpha = 52.5066 contains an object of type patch. Axes object 2 with title Alpha = 7.3917 contains an object of type patch. Axes object 3 with title Alpha = 3.2274 contains an object of type patch. Axes object 4 with title Alpha = 0.77523 contains an object of type patch.

입력 인수

모두 축소

알파 셰이프로, alphaShape 객체로 지정됩니다. 자세한 내용은 alphaShape를 참조하십시오.

예: shp = alphaShape(x,y)(x,y) 점 좌표에서 2차원 alphaShape 객체를 만듭니다.

출력 인수

모두 축소

고유한 알파 셰이프의 알파 값으로, 내림차순으로 정렬된 열 벡터로 반환됩니다.

버전 내역

R2014b에 개발됨

참고 항목

|