Also there will be one interconnected object not multiple ones. Calculations and lots of other things are done from the user interface I already built. This screen is just for viewing the result and evaluating it by examination. There will no functionality to change the model from this screen. Thus the aim is simple, just to be able rotate the camera to examine different parts of the polymer molecule.
sub DrawGLScene { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glColor4f(0.2,0.8,0.6,.95); glTranslatef(-1.5, 0.0, -6.0); ##Here are the translations that are done in response to key pressing, ##At the start these values are zero glTranslatef(0.0,0.0,$Z_Off); glRotatef($Y_Speed,0.0,1.0,0.0); glRotatef($X_Speed,1.0,0.0,0.0); for ($index=0; $index<5; $index++){ glPushMatrix(); glScaled(2.0, 1.1, 1.1); glTranslatef(5*$index,0,0); glBegin (GL_QUADS); gluSphere($newQuad,1, 32, 16); glEnd ; glPopMatrix(); } glutSwapBuffers;}