필터 지우기
필터 지우기

Points which are inside a cone

조회 수: 1 (최근 30일)
yogesh jain
yogesh jain 2015년 12월 13일
댓글: yogesh jain 2015년 12월 16일
Hello all, I have a query , I have a cone and I know its R and H . I also know the outer points of the cone .How I can get all points which lie inside the cone and describes the cone . thank you
  댓글 수: 2
John D'Errico
John D'Errico 2015년 12월 13일
편집: John D'Errico 2015년 12월 13일
There are infinitely many points inside a cone, or any non-degenerate volume.
yogesh jain
yogesh jain 2015년 12월 14일
Ya , those are many . But some of them which can tend to make a solid cone . I know the starting and ending points of the cone . thank you

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

채택된 답변

Walter Roberson
Walter Roberson 2015년 12월 13일
  댓글 수: 11
Walter Roberson
Walter Roberson 2015년 12월 16일
When an object is symmetric around one axis, then rotating around the axis produces a result identical to the original. Therefor your "dependent on x,y,z and az-el only" is really describing a cone at an arbitrary location and orientation in space, not a restricted case at all.
yogesh jain
yogesh jain 2015년 12월 16일
yes sir , that is true . But when I am rotating the points around any of the axis it is not showing them precisely . I used these -
r=5 ; h=20;
x1=2 ; x2 =20 ; y1=3 ; y2 =3 ; z1=12; z2 = 12;
xvec = floor(-r+x1):ceil(r+x1);
yvec = xvec;
hvec = 0:ceil(h);
[X, Y, H] = ndgrid(xvec, yvec,0:floor(h));
r_at_H = r * (1 - H/h);
is_in_cone = abs(X) <= r & abs(Y) <= r & H <= h & sqrt(X.^2+Y.^2) <= r_at_H;
Xc = X(is_in_cone);
Yc = Y(is_in_cone);
Hc = H(is_in_cone);
Xc1=Xc+20.3;
Yc1=Yc+10.5;
Hc1=Hc+12.7;
A(:,1)=Xc1;
A(:,2)=Yc1;
A(:,3)=Hc1;
B=ceil(A);
theta=45;
rad=degtorad(theta);
C=B*[1,0,0 ; 0,cos(rad),sin(rad) ; 0,sin(rad),cos(rad)]; % X-plane
Xc2=C(:,1);
Yc2=C(:,2);
Hc2=C(:,3);
pointsize = 20;
scatter3(Xc2,Yc2,Hc2, pointsize, 'filled');
Thank you

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by