在圆柱体/圆锥体上均匀生成 3D 点 [英] uniform generation of 3D points on cylinder/cone

查看:25
本文介绍了在圆柱体/圆锥体上均匀生成 3D 点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在圆柱体和圆锥体(分别)上随机均匀地生成点.圆柱体由其中心、半径和高度定义.锥体规格相同.我能够获得每个形状的边界框,所以我想在边界框内生成点.但是,我不确定如何将它们投影到圆柱体/圆锥体上,或者这是否是最好的主意.

I wish to randomly and uniformly generate points on a cylinder and a cone (separately). The cylinder is defined by its center, its radius and height. Same specifications for the cone. I am able to get the bounding box for each shape so I was thinking of generating points within the bounding box. However, I'm not sure how to project them onto the cylinder/cone or if this is the best idea.

有什么建议吗?

谢谢.

推荐答案

圆柱体的情况是微不足道的.如果半径 r > 0 且高度 h > 0 的圆柱体是 (x, y, z) = (r cos φ, r sin φ, z) 在 φ ∈ [0, 2π[ 和 z ∈ [-h] 上的图像/2, h/2],然后简单地在这些间隔上随机选择 φ 和 z.当然,也可以使用标准参数化简单地参数化锥体,但是这样一来,参数平面上的面积元素就不会是恒定的,因此点的分布也不会是随机的.因此,您需要找到不同的参数化.我在 我的 AlgoSim 站点 上详细讨论了这个主题.

The cylinder case is trivial. If the cylinder of radius r > 0 and height h > 0 is the image of (x, y, z) = (r cos φ, r sin φ, z) on φ ∈ [0, 2π[ and z ∈ [-h/2, h/2], then simply choose φ and z randomly on these intervals. Of course one can simply parametrise the cone as well using the standard parametrisation, but then the area element will not be constant on the parameter plane, and so the distribution of points will not be random. Thus you need to find a different parametrisation. I have discussed this topic in detail for a sphere at my AlgoSim site.

这篇关于在圆柱体/圆锥体上均匀生成 3D 点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆