Points which are inside a cone
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
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
2015년 12월 13일
편집: John D'Errico
2015년 12월 13일
There are infinitely many points inside a cone, or any non-degenerate volume.
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
2015년 12월 13일
0 개 추천
댓글 수: 11
yogesh jain
2015년 12월 14일
편집: yogesh jain
2015년 12월 14일
Thank you very much Mr. Roberson and sorry I did not check your previous answer .
yogesh jain
2015년 12월 14일
And what if I want to get inside points of cone according to its starting and ending points ?
Walter Roberson
2015년 12월 14일
What does it mean for a cone to have a starting point?
yogesh jain
2015년 12월 14일
hello , starting point is where I want to place the circular part and ending point is where the conical section will end .

Walter Roberson
2015년 12월 14일
The easiest way is to do the generalized rotation that you already said was too complicated; however if you are willing to constrain the orientations then there might be an easier way.
yogesh jain
2015년 12월 14일
yes , you are right . but the code u provided is for general cone . How we can alter that for rotated and shifted cone ? is my question . Thank you .
Walter Roberson
2015년 12월 14일
This code here is for the very specific case of a cone whose tip is at x = 0 and y = 0 and for which the center of the base is at (0,0,0) . To extend this to rotated and shifted cones can require the whole power of that link from earlier that worked out rotations in 3 space along an arbitrary center. Perhaps I could work out an easier way... but it is 04:40 in the morning here and I am not going to think about it until after I sleep and you have described exactly which axes of rotations are permitted for your situation. Remember, any cone anywhere in space could be described as having only been rotated and shifted. For example in your earlier question about cylinders you talked about it being rotated only around z: does that hold true for this as well? Rotate around z and then translate?
yogesh jain
2015년 12월 14일
I am really very grateful towards your all considerations . Yes , the cone also permitted to rotate around z-dir . according to the rotation and point input by user I am placing the cone so it might be having random parameters (dependent on x,y,z and az-el only) . as I already told parameters of cone are R and H only . thank you
yogesh jain
2015년 12월 16일
But if you really have any algorithm for getting inner points for cone which has starting and ending points please share that with me . thank you
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
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개)
카테고리
도움말 센터 및 File Exchange에서 Assembly에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
