/* Anita Yip's notes: The gazebo is a standing platform with 4 moderately fat columns supporting it at the corners on the underside. On top of the standing platform is a very thin raised platform that can be seen in a different color.The standing platform also has 4 fairly stout columns at the corners, which appear to be supporting the gazebo top. The gazebo top looks like a square pyramid without a base. Currently the standing platform is colored maroon, the raised platform pale goldenrod, the columns on and below the standing platform wheat, and the top is colored cucumber green. The gazebo is designed so that the standing platform would be a square, whose edges are equal in size on the x and z axis and are readjustable. The height of the gazebo is also readjustable. The dimension of the gazebo is currently set to 2 in width, 3 in height, and 2 in depth. However, only the gazebo platform will be 2 in width and depth. The gazebo top on the other hand will extend farther out beyond that. This is determined by the definition of the gazeboTopEdge constant, which is currently set to be a half of the gazeboEdge farther out. */ /* Gazebo notes: The reference point of the gazebo is in the center at the bottom of the gazebo. The ayipGazebo function takes in 5 parameters. 1.) gazeboXPos takes in a float to determine the x position of the gazebo 2.) gazeboYPos takes in a float to determine the y position of the gazebo 3.) gazeboZPos takes in a float to determine the z position of the gazebo 4.) gazeboEdge determines the width and depth of the standing platform, which is designed to look like a square from a bird's eye view 5.) gazeboEdge determines the height of the entire gazebo from the underside column to the top of the gazebo */ void ayipGazebo(float gazeboXPos, float gazeboYPos, float gazeboZPos, float gazeboEdge, float gazeboHeight); // ================================================================ // *********** My Object for the object library ************ // Function: Draws a round tall table for a cafe-like environment. // // The colors of the table can be chosen by the user. // drawTable(...) takes 4 parameters in total. // It takes 4 different colors in the following order: // 1. color of the round top surface of the table // 2. color of the supporting main bar of the table // 3. color of the small outer bar toward the bottom of the table // 4. color of the round base of the table // // Note that there is no option for choosing the measurements of // individual components so that, by default, the proportion and // the shape of the table can remain the same as it was created. // Any affine transformations can be used to resize the table. // By default, the size of the round top surface of the table // is set to radius of 6.0 units with the thickness of 1.0 unit. The bar // that supports the table top surface is 20 times the thickness of // the top surface of the table. Then, the round base of the table // is smaller in scale (about radius of 4.7 units) than the top table surface // with the thickness of less than 1/3 the top table surface thickness. // The bottom surface of the round base ends at the end of the // table support since those two objects overlap. // This means that when objects are placed around this table, // it is good to keep in mind that, at most, the space this table will // occupy is 12.0 units horizontally (x, z direction) // and 21.0 units vertically (y direction). // // The origin of the table is at the bottom surface of the lowest // round base of the table and at the center of the region. // // Since it's a round table, all sides of the table look the same. // Therefore, by default, from positive Z-axis, you'll see one side // of the table - table top surface, supporting bar, and base. void gkim1DrawTable(twTriple _surfaceColor, twTriple _barColor, twTriple _smallBarColor, twTriple _baseColor); // ================================================================ /* My Creative Object for the Object Library Purpose: Function draws a three flower bouquet Justina Wang justinawang.h Function: void jwangFlowerBouquet(twTriple color1, GLfloat num1, twTriple color2, GLfloat num2, twTriple color3, GLfloat num3, int flowerHeight); ********************************** PARAMETERS ********************************** My function takes seven arguments: 1. Color of flower 1 - twTriple 2. Number of petals on flower 1 - GLfloat 3. Color of flower 2 - twTriple 4. Number of petals on flower 2 - GLfloat 5. Color of flower 3 - twTriple 6. Number of petals on flower 3 - GLfloat 7. height of flower 1,2,3 - int ********************************** DETAILS ********************************** ORIGIN: The origin of the bouquet is at the bottom of the stems of the flowers. ORIENTATION: The flower is built up in a positive y direction. SIZE: The petal size and pollen center size are immutable. The stem of the flower is 0.1 in radius, but the height is specified by the user (parameter #7). COLORS: Each flower color is specified by the user (parameters #1, #3, #5). ************************************ FURTHER DESCRIPTION ************************************ PETALS: The petals are drawn tilted 15 degrees up. The size of the petal is 0.2 in height (y axis), 0.5 in length (x axis) 0.1 in width (z axis). The function twDisk is used, and so the normal of the petal is in the positive z direction FLOWER: The flowers are the color specified by the user. It has low specular light value of 0.3 and a low shininess value of 10. The number of petals are specified by the user. They are evenly spaced out around the pollen center.The pollen center is yellow and is a sphere with a radius of 0.15. The stem is green and has the height specified by the user. */ // THE HEADER WITH DOCUMENTATION // ******************************************** // draws three flowers. takes seven parameters: the colors and number of // petals for each of the flowers and the flower height // ******************************************** void jwangFlowerBouquet(twTriple color1, GLfloat num1, twTriple color2, GLfloat num2, twTriple color3, GLfloat num3, int flowerHeight); // ================================================================ //Headers and Documentation for objects created by Justine Aylmer //CS 307 /* Draws a temple that is 17 units along the x-axis, 34 units along the z-axis, and 23 units along the y-axis. Its origin lies at the front left corner. Temple is all one color, so material and lighting should be specified by user. */ void jaylmerTemple(); /* Draws a boat that is 10 units long (along x-axis) with oars spanning 16 units (along z-axis). It is 2 units high, and is drawn from the center. Color and lighting should be specified by user. */ void jaylmerBoat(); /* Draws a trident that is 35 units long (along y-axis), 14 units wide (along x-axis) and is drawn from the bottom of the handle, facing down. Color and lighting should be specified by user. */ void jaylmerTrident(); // ================================================================ /*Sarah Abraham .h file for Library Metal Gear Rex 11/6/05 #Added bezier surfaces to its feet, making them rounded 11/25/05 #Moved around some of the comments for convenience #Made the drawRex function take three color values as parameters This is based on the mech design Metal Gear Rex from the video game, Metal Gear Solid. */ void sabrahamRex (twTriple main, twTriple light, twTriple dark); /* This command draws the actual mech. Takes three twTriples as parameters, which represent the main, light and dark colorings of the mech. -Origin at bottom right corner of its right lower leg. -Rex Size (estimated): Height > 4.5, Width > 3.5, Length < 9 Here is a listing of the parts as referred to in the coding: Lower Right Leg - right leg, bottom part that touches ground Right Leg Extension - back part of right leg that also touches ground Upper Right Leg - right leg, upper part that connects to torso Lower Left Leg - left leg, bottom part that touches ground Upper Left Leg - left leg, upper part that connects to torso Bottom Torso - lower part of torso, where legs connect Upper Torso - upper part of torso, where arms and head connect Right Arm - actually just an incredibly big gun on right side Left Arm - nuke launcher on left side Head - cockpit, placed in the middle of the upper torso */ // ================================================================ //Stephanie Judge /* This creates a Penguin of a user-specified size. The feet are made of polygons and disks with a low stack and slice count, to make them seem more toy-like, as this is a toy penguin. The body is made up of two scaled spheres, one white, and one black. The black one lies further back than the white, overlapping to give the appearance of a white belly. The arms are made up of a scaled, flat cube and a disk for the bottom, curved end of the arms. The head is a black sphere, with a cone for a beak, which is rotated upwards. The eyes are also made up of two spheres, one white, with a black sphere slightly outside and forward. Finally, there is a tail in the back made up of a cylinder with a wide base and narrow top. When specifying a size, the penguin will be about 4*size units tall. */ void sjudgePenguin(int size) ; // ================================================================ /************ Mala's Objects for the F05 Object Library ************ /*----------------------------------------------------------------------- Function: Draws a cylindrical vase containing a singular flower vase(...) takes 6 parameters in total, and calls a subfunction named flower. 1 vaseScale [int] scaling/size of the vase - the radii of the top & bottom of the vase (drawn using twCylinder) will be half this number *Please note, once the vaseScale measurement has been given, the flower is drawn proportionally. 2 vaseColor [twTriple] the main color of the vase 3 bottomColor [twTriple] the coloring of the bottom of the vase 4 rimColor [twTriple] color of the rim at the top of the vase 5 flowerColor1 [twTriple] one color used in creation the flower 6 flowerColor2 [twTriple] another color used in creation of the flower For best aesthetic results, do not use the same color for vaseColor and bottomColor, or flowerColor1 and flowerColor2. If you prefer a vase without the rim accent, use the same color for rimColor as you do for vaseColor. */ void msarkarVase(int vaseScale, twTriple vaseColor, twTriple bottomColor, twTriple rimColor, twTriple flowerColor1, twTriple flowerColor2); /*--------------------------------------------------------------------- Function: Draws a long couch with arms constructed of glutSolidCubes couch(...) takes 3 parameters in total 1 e [int] The scaling of the couch. The width & height will each be 3 times this number,and the depth will be 2.5 times this number 2 colorA [twTriple] main color of the couch 3 colorB [twTriple] piping of the couch (accented edges for definition) */ void msarkarCouch(int e,twTriple colorA,twTriple colorB); /*--------------------------------------------------------------------- ceilingLight function: Draws a lamp meant to be hung from the ceiling, complete with lightshade and bulb ceilingLight(...) takes 3 parameters in total 1 lh [int] height of the light pole from which the shade hangs from. 2 mat [twTriple] color of the lighting structure 3 bulbcolor [twTriple] color of the light bulb within the light shade The shade does not adjust according to 'lh' or the pole height, so in that sense the light is not scalable. Notice that the yellow bulb stays a stark bright yellow if you enable lighting in the msarkarCeilingLight demo; if you want to disable this feature, change the value of light0 within the function to 'false.' */ void msarkarCeilingLight(int lh, twTriple mat, twTriple bulbColor); /*--------------------------------------------------------------------- ottoman function: Draws an ottoman using glutSolidTorus and a flattened sphere to cover the middle ottoman(...) takes 2 parameters in total 1 ottomanScale [int] scaling of the ottoman/diameter of the ottoman 2 ottomanColorA [twTriple] main color of the body of the ottoman 3 ottomanColorB [twTriple] color of middle of ottoman, and accents The ottoman should looks alright in a room setting with lighting. In the demo there is some lighting, but for added clarity I've added piping to the ottoman, and made the middle of the ottoman a different color. The simplest way to get rid of these effects is to use the same twTriple for the second and third parameter. Alternatively, you could delete the lines which draw the wireTorus piping. */ void msarkarOttoman(int ottomanScale, twTriple ottomanColorA, twTriple ottomanColorB) ; // ================================================================ // *********** My Object for the object library ************ // This function draws a mailbox. The mailbox's origin is at the center at the // base of the post of the mailbox. // The mailbox is drawn upright, sitting on the x-z plane. // The opening of the mailbox is along the z axis and faces down the +ve z axis // The user specifies the height of the mailbox as a float and // an integer choosing from one of 3 colors (0:red, 1:green, 2:purple) // The default mailbox is purple. // The mailbox's width is a third of the height specified and the depth // is about 2/3rds the height of the mailbox. // The length of the post of the mailbox is .6 of the height. // The post of the mailbox is automatically set to brown. void sdelrosaMailbox(float height, int color); // ================================================================ /***********************************************************/ // Objects created by Zsuzsa Moricz, Fall 2005. // CS307 - Computer Graphics, Professor Scott Anderson /*------------ HAT - (SELF-CONTAINED FUNCTION) ------------*/ // Hat is created from a torus, a cylinder and a disk. // Origin is at the bottom of the hat // to be able to place it on a head or a surface. // Radius of hat 1.4, height 2. // Color needs to be set by the user beforehand with twColor(). // Suggested values: 0.5 for specularity and 100 for shininess. */ void zmoriczHat(); /*------------ CLUB - (SELF-CONTAINED FUNCTION) ------------*/ // The club has a total height 7.5. // Origin is at handle and the club points downwards. // Color needs to be set by user beforehand with twColor(). // Suggested values: 1 for specularity and 30 for shininess. void zmoriczClub(); /*------------ BEANBAG - (SELF-CONTAINED FUNCTION) ------------*/ // Beanbag is a striped juggling ball. // To make the ball striped two spheres are placed into each other: // one is stretched along the x-axis while the other one along the z-axis. // This is how the illusion of the stripes is created. // Origin is at the bottom of the ball, radius of ball is 1. // Beanbag has two colors one is always black. // The other one is determined by the user with the twColor() function // before the beanbag function is called. // Suggested values: 1 for specularity and 40 for shininess. void zmoriczBeanbag(); /*------------ SPIRAL - (SELF-CONTAINED FUNCTION) ------------*/ // This function draws a spiral. // One spiral has length 4. // It takes 3 arguments: // 1: color // 2: int n - the number of spirals put together // 3: int nsteps - how many steps it takes to draw the curve // (efficiency vs smoothness) // Light behaves a little strange with this bezier curve. // Origin is at the bottom of the spiral. // And the spiral advances along the +y-axis. void zmoriczSpiral(twTriple color, int n, int nsteps); // ================================================================ // *********** My Object for the object library ************ // Function: Draws three flowers of different colors. // drawFlower() creates one flower and takes one parameter, which // is an integer to determine what color to use for the flower // (0 for plum, 1 for pink, and 2 for purple). // drawThreeFlowers() then calls the drawFlower() function to // draw the plum, pink and purple flowers. void jguintoDrawFlower(int color); void jguintoDrawThreeFlowers(); // ================================================================ //Jackie Weber (jweber2) /* My object for the Object Library table(...) takes four parameters 1) float tablePostLeftX 2) float tablePostRightX 3) float tablePostTopZ 4) float tablePostBottomZ These are the positions of the table legs. This is assuming a normal coordinate system with a normal (down the z axis) camera view. The size of the top of the table is: tablePostRightX-tablePostLeftX tablePostTopZ-tablePostBottomZ y=4 The legs are brown, the top is white*/ void jweber2Table(float tablePostLeftX,float tablePostRightX,float tablePostTopZ,float tablePostBottomZ); //Jackie Weber /* My object (version 2) for the Object Library table(...) takes four parameters 1) float tablePostLeftX 2) float tablePostRightX 3) float tablePostTopZ 4) float tablePostBottomZ 5) GLuint texid s the texture ID to be used for table legs, see glGenTextures 1-4 are the positions of the table legs. This is assuming a normal coordinate system with a normal (down the z axis) camera view. The size of the top of the table is: tablePostRightX-tablePostLeftX tablePostTopZ-tablePostBottomZ y=4 top of table is white*/ void jweber2Table2(float tablePostLeftX,float tablePostRightX,float tablePostTopZ,float tablePostBottomZ, GLuint texid);