- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在开发一款生成多边形网格来表示球体的软件,我想在球体上切一个洞。这个多边形网格只是球体表面的一个覆盖层。我很清楚如何确定哪些多边形将与我的洞相交,我可以将它们从我的收藏中删除,但在那之后我有点困惑。我想知道是否有人可以帮助我了解高级概念?
基本上,我设想了三种情况:
1.) The cylindrical hole does not intersect my sphere.
2.) The cylindrical hole partially goes through my sphere.
3.) The cylindrical hole goes all the way through my sphere.
对于 #1,我可以对此进行测试(没有删除多边形)并采取相应行动(什么都不做)。对于 #2 和 #3,我不确定如何重新分割我的球体以解决这个洞。对于#3,我有一些基本的想法,大致如下:
a.) Find your entry point (a circle)
b.) Find your exit point (a circle)
c.) Remove the necessary polygons
d.) Make new polygons along the 4* 'sides' of the hole to keep my
sphere a manifold.
这个极其简化的算法有一些我想填补的“漏洞”。例如,我实际上不想让我的洞有 4 个边——它应该是一个圆柱体,或者至少是一个圆柱。我也不确定如何制作这些新的多边形以使我的球体在镶嵌曲面上有一个洞。
我不知道如何处理场景 #2。
最佳答案
听起来像你想要的constructive solid geometry .
关于algorithm - 我有一个 OpenGL Tessellated Sphere,我想在其中切一个圆柱形孔,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3963957/
使用登录后,我想吐出用户名。 但是,当我尝试单击登录按钮时, 它给了我力量。 我看着logcat,但是什么也没显示。 这种编码是在说。 它将根据我在登录屏幕中输入的名称来烘烤用户名。 不会有任何密码。
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎是题外话,因为它缺乏足够的信息来诊断问题。 更详细地描述您的问题或include a min
我是一名优秀的程序员,十分优秀!