

def __init__(self, radius=150):
    Shape3D.__init__(self)
    self.topPent = [PVector() for _ in range(5)]
    self.bottomPent = [PVector() for _ in range(5)]
    c = dist((cos(0) * radius), (sin(0) * radius), (cos(radians(72)) * radius), (sin(radians(72)) * radius))
    b = radius
    a = sqrt(((c ** 2) - (b ** 2)))
    self.triHeight = sqrt(((c ** 2) - ((c / 2) ** 2)))
    angle = 0
    for i in range(5):
        self.topPent[i] = PVector((cos(angle) * radius), (sin(angle) * radius), (self.triHeight / 2.0))
        angle += radians(72)
    self.topPoint = PVector(0, 0, ((self.triHeight / 2.0) + a))
    angle = (72.0 / 2.0)
    for i in range(5):
        self.bottomPent[i] = PVector((cos(angle) * radius), (sin(angle) * radius), ((- self.triHeight) / 2.0))
        angle += radians(72)
    self.bottomPoint = PVector(0, 0, (- ((self.triHeight / 2.0) + a)))

dataset/ETHPy150Open jdf/processing.py/mode/examples/Topics/Geometry/Icosahedra/icosahedron.py Icosahedron.__init__/original