2014-06-23 30 views

回答

3

質量問題需要質量響應

for (int i = 0; i < 50000; i++) { 
    glPushMatrix(); 
    glTranslatef(-500 + rand() % 1000, 7 + rand() % 100, -500 + rand() % 1000); 
    glutSolidTeapot(10); 
    glPopMatrix(); 
} 

或者還不如不過剩

GLUquadric* q = gluNewQuadric(); 
for (int i = 0; i < 50000; i++) { 
    glPushMatrix(); 
    glTranslatef(-500 + rand() % 1000, 7 + rand() % 100, -500 + rand() % 1000); 
    gluSphere(q, 10, 10, 10); 
    glPopMatrix(); 
} 
gluDeleteQuadric(q);