Python 圆环体opengl不收敛
我在Opengl中的圆环有问题 以下是我在Python上的代码:Python 圆环体opengl不收敛,python,opengl,graphics,Python,Opengl,Graphics,我在Opengl中的圆环有问题 以下是我在Python上的代码: global numc, numt, r twopi = 2 * math.pi for i in range(0, numc): for j in range(0, numt): k = 1 while k >= 0: s = (i + k) % numc + 0.5 t = j % numt x = (1
global numc, numt, r
twopi = 2 * math.pi
for i in range(0, numc):
for j in range(0, numt):
k = 1
while k >= 0:
s = (i + k) % numc + 0.5
t = j % numt
x = (1 + r * math.cos(s * twopi / numc)) * math.cos(t * twopi / numt)
y = (1 + r * math.cos(s * twopi / numc)) * math.sin(t * twopi / numt)
z = r * math.sin(s * twopi / numc)
Colors_torus.extend([1.0, 0.0, 0.0])
Torus.extend([x, y, z])
k -= 1
我看到的是三角形连接的问题,而不是顶点生成的问题。@Ripi2我使用GL\u QUADS\u STRIP