/* Demo of an f05 object. Implemented Fall 2005 Scott D. Anderson */ #include #include #include #include const GLfloat R = 6.0; // surfaceBaseRadius void display(void) { twDisplayInit(0,0,0); twCamera(); // colors chosen the table object in this particular scene twTriple surfaceColor = {204.0/255.0, 153.0/255.0, 102.0/255.0}; // similar to tan twTriple barColor = {255.0/255.0, 255.0/255.0, 204.0/255.0}; // very light yellow twTriple smallBarColor = {125.0/255.0, 125.0/255.0, 125.0/255.0}; // light gray twTriple baseColor = {95.0/255.0, 95.0/255.0, 95.0/255.0}; // dark gray gkim1DrawTable(surfaceColor, barColor, smallBarColor, baseColor, R); glFlush(); glutSwapBuffers(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); twInitWindowSize(500,500); glutCreateWindow(argv[0]); glutDisplayFunc(display); twBoundingBox(-R,+R,0,R*3.5,-R,+R); // bounding box for the table. Height found by trial and error twMainInit(); glutMainLoop(); return 0; }