在球体上均匀地生成点 [英] Generating points uniformly on a sphere

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

问题描述

我感兴趣的生成是'均匀'点分布在一个球体,很像高尔夫球的凹坑或上一个足球六边形的顶点(和非随机地)。是否有明确定义的算法来做到这一点?

I'm interested in generating points that are 'uniformly' (and non-randomly) distributed around a sphere, much like the dimples of a golf ball or the vertices of the hexagons on a soccer ball. Are there well defined algorithms to do this?

注:我知道点不真均匀分布在球体上,但它们被分布的方式,点的分布看起来从看起来直在任何点的任何方向是相同的 - 这是我有什么兴趣

Note: I know that the points are not really 'uniformly' distributed on a sphere, but they are distributed in a way that the distribution of points looks the same from any direction that looks straight at any of the points - this is what I am interested in.

推荐答案

选择U,V随机抽取[0,1]。  2 PI; u是经度。  阿辛(2V-1)是纬度。 只有两个随机变量,也没有拒绝。

Choose u,v randomly from [0,1]. 2πu is longitude. asin(2v-1) is latitude. Only two random variables, and no rejections.

顺便说一句,我的链接集合有一个新的地址: http://bendwavy.org/sphere.htm

By the way, my link collection has a new address: http://bendwavy.org/sphere.htm

和我已经把它复制过来 http://cgafaq.info/wiki/Evenly_distributed_points_on_sphere

And I've copied it over to http://cgafaq.info/wiki/Evenly_distributed_points_on_sphere

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

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