How to generate random points within 3d pyramid
조회 수: 2 (최근 30일)
이전 댓글 표시
giving the parameters as
E0= (0,0,1); E1= (1,1,0); E2=(-1,1,0); E3=(-1,-1,0); E4=(1,-1,0)
댓글 수: 4
Jan
2019년 6월 13일
편집: Jan
2019년 6월 13일
@Musa: I've used the buttons on top of the edit field to format your comment. This improves the readability.
Does you comment mean, that you need uniformly distributed points? How many?
Is a rejection method sufficient for your case? This means: Determine random point in the cuboid surrounding the pyramid and reject all points outside the pyramid.
답변 (1개)
Jan
2019년 6월 12일
편집: Jan
2019년 6월 12일
댓글 수: 1
Jeremiah Abimbola
2019년 6월 20일
I also have this challenge, going through the post from the link you shared was not explanatory me, moreso, that was 2D, mine is in a 3D space.
I refer to your question asked on Musa's original question
Is a rejection method sufficient for your case? This means: Determine random point in the cuboid surrounding the pyramid and reject all points outside the pyramid.
For me, Yes: uniformly distributed random points; and Yes determine random point in the cuboid surrounding the pyramid and reject all points outside the pyramid, like in this picture
참고 항목
카테고리
Help Center 및 File Exchange에서 Yield Curves에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!