How to generate random points within 3d pyramid

2 ビュー (過去 30 日間)
Musa Mustapha
Musa Mustapha 2019 年 6 月 12 日
コメント済み: Jeremiah Abimbola 2019 年 6 月 20 日
giving the parameters as
E0= (0,0,1); E1= (1,1,0); E2=(-1,1,0); E3=(-1,-1,0); E4=(1,-1,0)
Screenshot 2019-06-12 at 8.56.35 PM.png
  4 件のコメント
Jan
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.
Jan
Jan 2019 年 6 月 14 日
The third time I'm asking this: Would a rejection method satisfy your needs?

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2019 年 6 月 12 日
編集済み: Jan 2019 年 6 月 12 日
  1 件のコメント
Jeremiah Abimbola
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 pictureScreenshot 2019-06-20 at 11.41.53 AM.png

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by