I want to generate a Geodesic Dome (sphere) with triangles using the panda3d engine.
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.
For rotation i use function setHpr(0,0,0) H for heading p for pitch r for roll
I have search for a mathematical function to replace my 0 values in:
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 ? Thanks in advance.