/* Demo of my creative object. Justina Wang justinawang-flowerBouquet.cc */ #include #include #include #include // IS THIS WHAT WE INCLUDE???? // #include <- not this // #include "justinawang.cc" <- temporarily this #include // global constant - changed with the function drawFlowers int bouquetHeight = 0; // <- breaks modularity int flowerHeight = 5; // I added this void display(void) { twDisplayInit(); twCamera(); twTriple red = {1,0,0}; twTriple blue = {0,0,1}; twTriple purple = {0.5,0,0.5}; // jwangFlowerBouquet(TW_RED,3,TW_BLUE,6,TW_PURPLE,4,5); <- invalid call jwangFlowerBouquet(red,3,blue,6,purple,4,flowerHeight); 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); // bounding box - found by trial and error twBoundingBox(-flowerHeight/4.0, flowerHeight/4.0, 0, flowerHeight+0.5, -1, 1); twMainInit(); glutMainLoop(); }