/* filename: mmoore2-PalmTree.cc written by: maui moore date: 26 October 2007 description: Palm Tree Demo OpenGL model of a palm tree. Copyright (C) 2007 by Marielle Moore under the GNU GPL */ #include #include #include //#include "mmoore2.h" //#include "mmoore2.cpp" #include twTriple palmColor1 = {0, 1.0, 0}; twTriple palmColor2 = {0, .80, .1}; twTriple palmColor3 = {0, .75, .5}; twTriple coconutColor = {.8, .25,.35}; twTriple trunkColor = {1.0, 0.9, 0.0}; const int treeHeight = 10; const int treeBase = 2; void display (void) { twDisplayInit(); twCamera(); mmoore2DrawPalmTree(palmColor1, palmColor2,palmColor3, coconutColor, trunkColor,treeBase, treeHeight); glFlush(); glutSwapBuffers(); } int main (int argc, char** argv) { /*code borrowed from Scott Anderson's Blocks.cc */ glutInit(&argc,argv); glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB|GLUT_DEPTH); twInitWindowSize(500,500); glutCreateWindow(argv[0]); glutDisplayFunc(display); twBoundingBox(0,15,0,15,0,15); twMainInit(); glutMainLoop(); return 0; } /* This file is part of moore2-PalmTree. moore2-PalmTree is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. moore2-PalmTree is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with moore2-PalmTree. If not, see . */