简体   繁体   English

如何使用Python获取测地线圆顶上三角形的3D坐标?

[英]How to get 3D coordinates of a triangle on a Geodesic Dome using Python?

I want to generate a Geodesic Dome (sphere) with triangles using the panda3d engine. 我想使用panda3d引擎生成带有三角形的Geodesic Dome(球形)。 I have searched in python for a function to position my all triangles in 3d world (x,y and z) and rotation to create the sphere. 我在python中搜索了将我的所有三角形定位在3d世界(x,y和z)中并旋转以创建球体的函数。 在此处输入图片说明

For rotation i use function setHpr(0,0,0) H for heading p for pitch r for roll 对于旋转,我使用函数setHpr(0,0,0)H表示航向p表示俯仰r表示滚动

I have search for a mathematical function to replace my 0 values in: 我正在寻找一个数学函数来替换我的0值:

class Triangle(GeometricObject):
    def __init__(self, x, y, z, h, p, r):
        self.x = x
        self.y = y
        self.z = z
        self.x = h
        self.y = p
        self.z = r  

Triangle_List=[]        
for i in range(0,2000):
    mytriangle=Triangle(0, 0, 0, 0, 0, 0)
    Triangle_List.append(mytriangle)

How can I transform the Triangle(0, 0, 0, 0, 0, 0) coordinates to the required values ? 如何将Triangle(0,0,0,0,0,0)坐标转换为所需值? Thanks in advance. 提前致谢。

The concepts to subdivide the faces and project to new points are described in the blog designing a geodesic house (part 1) . 设计大地测量房屋的博客(第1部分)中描述了将面孔细分并投影到新点的概念。 A more thorough treatment is the book Geodesic Math and How to Use It by Hugh Kenner 1976. 更全面的方法是Hugh Kenner 1976年出版的《 大地测量数学和使用方法》一书。

PyDome will provide the coordinates for many types of geodesic dome configurations. PyDome将提供许多类型的测地线穹顶配置的坐标。 Python Code on GitHub. GitHub上的Python 代码

Rick Bono's DOME Program written in C++ has extensive documentation and features. Rick Bono的C ++编写的DOME程序具有广泛的文档和功能。

Acid Dome is one online calculator that provides the templates for edges and faces, but not the coordinates. Acid Dome是一个在线计算器,提供边缘和面的模板,但不提供坐标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 python 中获取 3D object 的坐标 - How to get the coordinates for a 3D object in python 如何使用 python 从二维坐标获取 3d 空间坐标? - how to get 3d space coordinates from 2d coordinates using python? 如何使用matplotlib python创建具有3个点的3d三角形 - how to create 3d triangle with 3 point using matplotlib python 如何在嵌入 3D 的表面上绘制测地线曲线? - How to plot geodesic curves on a surface embedded in 3D? 使用python分离DBSCAN中每个簇的坐标(3D坐标) - Separating the coordinates(3D coordinates) for each cluster in DBSCAN using python 使用 Python 生成 3D 对象的三角形网格 - Triangle mesh generation of 3D objects using Python 如何使用 python 导出 3d delaunay 三角形网格? - How to export 3d delaunay triangle mesh with python? 使用tetgen或三角形(或网格物体)创建空心圆顶 - Using tetgen or triangle (or meshpy) to create a hollow dome 如何在matplotlib中绘制具有三角形顶点坐标的3d三角形(每个三角形9个数字)? - How to plot 3d triangles in matplotlib with triangles vertices's coordinates (9 numbers for each triangle)? 如何在Python中获取每次单击的3D模型的(x,y,z)坐标? - How to get the (x,y,z) coordinates of a 3D model of every click in Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM