如何用n梯形面板限制球体
不确定这是在这里还是在数学交换上。
所以我有一个半径r的范围。我想在图块/面板中限制它,然后我可以用纬度和经度组织的现实世界中的数据填充。但是我坚持如何生成瓷砖。
谢谢
not sure if this belongs here or on the mathematics exchange.
So I have a sphere of radius r. I want to circumscribe it in tiles/ panels which I can then populate with data from the real world organized by latitude and longitude. But I'm stuck on how to generate the tiles.
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您将球形切成梯形,则球将分为环,然后在这些环之间绘制梯形。我在这里做了一个工作示例,显示生成的球体(请原谅,但是制作小提琴更容易)。 https://jsfiddle.net/uyrk1vb8/
点像这样计算了点,从-π计算了点/2至π/2,圆形圆形从0到2π不等。
然后通过连接这些点来创建梯形。小提琴在函数计算中提供了一个示例。
If you are tessellating a sphere into trapezoids, the sphere is divided into rings and then trapezoids are drawn between those rings. I've made a working example here that displays the generated sphere (excuse the typescript, but it is easier to make fiddles). https://jsfiddle.net/uyrk1vb8/
The points are calculated like this, where ringAngle varies from -π/2 to π/2 and the circleAngle varies from 0 to 2π.
Then trapezoids are created by connecting those points. The fiddle provides an example of this in the function calculateTrapezoid.