Preview

How Does Glfloat Shape

Powerful Essays
Open Document
Open Document
376 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
How Does Glfloat Shape
#include "stdafx.h"
#include "windows.h"
#include "glut.h"
#include "gl/GL.h"
#include "gl/Glu.h"

GLfloat spe_x = 1.0f;
GLfloat spe_y = 1.0f;
GLfloat spe_z = 1.0f;
GLfloat spe_a = 1.0f;
GLfloat wall_1 = 1.0f;

GLfloat translate_x = 0.6f;
GLfloat translate_y = 0.38f;
GLfloat translate_z = 0.5f;

float jack_radius = 0.1;

bool isTrue = false; bool isTrue_r = false;

GLfloat rot = 90.0;

// Wall void wall(double thickness)
{
// draw thin wall with top xz-plane, corner at origin

glPushMatrix(); glTranslated(0.5, 0.5 * thickness, 0.5); glScaled(1.0, thickness, 1.0); glutSolidCube(1.0); glPopMatrix();
}

// table Leg void tableLeg(double thick, double len)
{
glPushMatrix(); glTranslated(0, len/2, 0); glScaled(thick, len, thick); glutSolidCube(1.0);
…show more content…
glPopMatrix(); glPushMatrix(); glTranslated(translate_x, translate_y, translate_z); glRotated(rot,0,1,0); glutSolidTeapot(0.08); glPopMatrix(); glPushMatrix(); glTranslated(0.25,0.42,0.35); glutSolidSphere(jack_radius,15,15); glPopMatrix(); glPushMatrix(); glTranslated(0.4,0,0.4); table(0.6,0.02,0.02,0.3); glPopMatrix(); wall(0.02); glPushMatrix(); glRotated(rot,0.0,0.0,1.0); wall(0.02); glPopMatrix(); glPushMatrix(); glRotated(-90.0,1.0,0.0,0.0); wall(0.02); glPopMatrix(); glFlush();
}

void mouse(int button, int state, int x, int y)
{
switch (button) { case GLUT_LEFT_BUTTON: if(state==GLUT_DOWN) { glClearColor((rand()%10)*0.1,(rand()%10)*0.1,(rand()%10)*0.1,0); } glutPostRedisplay(); break;

case GLUT_RIGHT_BUTTON: if(state==GLUT_DOWN) { spe_x = (rand()%10)*0.1; spe_y = (rand()%10)*0.2; spe_z = (rand()%10)*0.4; spe_a = (rand()%10)*0.04; } glutPostRedisplay(); break; }
}

void idleFunc(){

rot += 0.1;

if (!isTrue_r) jack_radius += 0.0005; else if (isTrue_r) jack_radius -= 0.0005; if (jack_radius >= 0.13) isTrue_r = true;

else if (jack_radius =

You May Also Find These Documents Helpful

  • Better Essays

    A Eurosta solidaginis, also known as the Golden Rod Gall Fly, is an insect that lives in a Solidago atlissma/ canadis. The female Gall Fly has an ovipositor which implants eggs in the Golden Rod plant. Eggs are implanted by the mother onto the apical meristem. At the apical meristem the larva releases a chemical that stimulates the host goldenrod which in return forms the gall (Abrahamson, Kenneth, McCrea, Whitwell, and Vernieri 1991). The gall acts as a protective barrier for the Eurosta Solidagnis. The larva transforms from larvae to pupa in the gall. The Eurosta solidaginis predators include other insects and birds. The ovipositon, which is the placing of the eggs, occurs in mid- late May (Abrahamson, Sattler, McCrea, and Weis 1989). The gall start to appear about 3 weeks after the oviposition, and they finish growing, reaching their full size three to four weeks later. The…

    • 1095 Words
    • 5 Pages
    Better Essays
  • Good Essays

    Grear Rafting Analysis

    • 1138 Words
    • 5 Pages

    Grear Rafting Company is the dream business of Ms. Grear, and has been in operation for one year, and according to the income statement she has provided, she is losing money. Because of her dream to maintain this rafting business, she has come to us for help to get her out of the red. In order to do this, we need to explain variable and fixed costs, period and product costs, and rewrite Grear Rafting’s income statement. Grear Rafting’s income statements is provided below.…

    • 1138 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    gasland analysis

    • 341 Words
    • 2 Pages

    In the beginning, the narrator Josh finds out a hydro-fracking rig has opened near his house. He is afraid that it will pollute his water source, so he starts documenting the effects of hydro-fracking on his neighbor's waters supplies. He goes on a trip to personally document the effects of hydro-fracking on people’s homes. When he goes out west, he discovers the government has turned a blind eye to the drilling process and the harmful effects the chemicals can the water supply. Through his documentary he discovers that not just water can be affected. He encounters a woman named Ms. Blackburn and discovers that her father who had been documenting this for years had died two months after a rig had been installed near his house due to pancreatic cancer. Similar cases had developed throughout every sight josh visited. The film concludes with the case between the Environmental board and the drilling company in which the company was not able to defend themselves. This was partly due to Josh and the samples he collected.…

    • 341 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Gasland Film Analysis

    • 559 Words
    • 3 Pages

    In the documentary Gasland Josh Fox talked about how people's properties were being invaded by fracking industries which is "hydraulic fracturing" which is drilling into the ground for natural gas as Josh Fox explained in this documentary. All of these people had been suffering with the water portion of it because with the oil drilling there water pipes were mixed in with the oil which there water faucets water came mixed with oil which meant that the water is not drinkable that’s why Fox went into a little adventure so he can personally see this and get evidence from all of these people with high oil underground. By visiting all of these people that were high in oil which most of the industries offered money for their land which was not enough…

    • 559 Words
    • 3 Pages
    Good Essays
  • Better Essays

    Grear Rafting Analysis

    • 2026 Words
    • 9 Pages

    Grear Rafting Company, owned by Peggy Grear is a company that provides rafting services to rafters. Grear Rafting Company, henceforth referred to as Grear Rafting, has just gone through its first season in business on which it provided rafting services to 1,048 rafters for seven (7) days. During these seven (7) days, Grear Rafting also provided meals to the rafters three times a day, it also provides the rafts used during the season. During its first season, however, Grear Rafting experienced a loss. Peggy Grear has enough savings to get Grear Rafting through another season or two of business, but Grear Rafting would have to shut its business down if it does not make a profit (Houston Baptist University, 2012). In this paper, I would show what Grear Rafting requires to break-even and make a profit. Grear Rafting’s income statement from its first season is shown below on Table 1.…

    • 2026 Words
    • 9 Pages
    Better Essays
  • Good Essays

    The Bulge Turning Point

    • 417 Words
    • 2 Pages

    The death of tons of people, (75,000) or more. The Battle of the Bulge was definitely a big turning point of World War 2. American defenders were caught off guard as more than 250,000 German troops and hundreds of tanks descended on their positions. During the Battle, 21,000 soldiers were killed, 43.000 were wounded and 24,000 were captured or went missing. Total allied casualties are estimated at 110,000 - making it the bloodiest battle for American troops in all of World War 2.…

    • 417 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Escherichia coli is a rod-shaped Gram-negative bacteria from the Enterobacteriaceae family, which owns the usual flora and can be be as pathogenic Human IN DUE can be cause diarrhea. The rational NOT USE ON antibiotics Infectious diseases can be causing the occurrence of resistance so that the necessary alternative to using Active Ingredients antimicrobial From medicinal plants. Turmeric (Curcuma domestica Val.) It is a prayer One Crop Growing in Indonesia That can be used as a medicinal plant. BECAUSE containing Active Compounds form of curcumin, flavonoids, alkaloids, tannins and Yang has a function as an antibacterial function. Singer study conducted to determine ACTIVITIES review antibacterial extract turmeric (Curcuma domestica Val.) Against the growth of Escherichia coli isolates from diarrhea patients in Hospital Muhammadiyah Palembang.…

    • 284 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Anatomical Structure

    • 1755 Words
    • 8 Pages

    Anatomical structure affects movement ability in the hip by the single non jointed structure of the pelvis. The pelvis rotates all three planes of movement. One movement is the rotating of the femur so that the acetabulum is positioned toward the direction of approaching femoral movement. Another is the posterior pelvic tilt, when the anterior superior iliac spine is tilted backward, it position the head of the femur in front of the hipbone to enable flexion. Lastly, anterior pelvic tilt enables femoral extension, and lateral pelvic tilt toward the opposite side facilitates lateral movements of the femur. Movement of the pelvic girdle also coordinates with certain movements of the spine. There are six muscles which are responsible for flexion…

    • 1755 Words
    • 8 Pages
    Good Essays
  • Good Essays

    Bacteria Morphology

    • 916 Words
    • 4 Pages

    Part 1: Viewing Prepared Slides of Common Bacterial Shapes Familiarize yourself with each morphological type to use as a comparative tool for the remainder of the activity. Record your observations. Part 2: Disinfecting Your Area to Use Live Organisms :…

    • 916 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Bacteria Shape and Size

    • 499 Words
    • 2 Pages

    What are the advantages of using bleach as a disinfectant? The disadvantages? The advantages of using 70% alcohol? The disadvantages?…

    • 499 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Anatomy of a Giraffe

    • 1024 Words
    • 5 Pages

    The Giraffe is perhaps one of the most iconic species of Africa and to the mysteries and intrigue that lie within the confines of evolution. The purpose of this paper is to explain how this wonderful, iconic organism has evolved physiologically to be suited to its’ environment. In this paper we will be discussing the elements that best describe its’ evolutionary progress. The areas we will be covering include the Skeletal System, the Digestive and Excretory System, and small parts of the Circulatory System. But first we will start with the evolution of the Giraffe, what family it belongs to, what some of its relatives are, and what some of its ancestors are.…

    • 1024 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Pull Patterns

    • 669 Words
    • 3 Pages

    Emergency room employees and health care providers tackle multi-activities simultaneously. Thus, they employ push and pull patterns to accomplish all their tasks. Saadoun (n.d.) stated that push patterns are also referred to as push control, and it is a system in which work tasks are actively disseminated accordingly and determines if the employee can view and/or choose several work items. An example of this push phenomenon is the claim processing (Saadoun, n.d.). In contrast, pull patterns also known as pull control are “resources that proactively identify and commit to work items” (Saadoun, n.d.). In addition, the pull system may recommend pressing work items that need tending or it suggests multiple views for available work tasks. The check-in…

    • 669 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Yr 11 GCSE Science 2013

    • 1397 Words
    • 6 Pages

    Preparing students for exams Exams  Biology B2, Chemistry C2 and Physics P2 papers for pupils studying Additional Science  Biology B2 and B3, Chemistry C2 and C3 and Physics P2 and P3 for pupils following the triple science course.  All exams 1hr and contribute 25% each  The controlled assessment accounts for 25% of each qualification Top Tips for Success in Science!  Use revision guides/ exercise books and make revision notes/cards on the areas that need to be learnt  Start revising early and plan time carefully.  Break revision into short sessions.…

    • 1397 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    [7] Louis A. Bloomfield, How Things Work: the physics of everyday life, Wiley. 4th Ed., 2010.…

    • 851 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Agnew’s general strain theory is an extension on Merton’s strain theory. This theory argues there are three sources of strain: failure to achieve positive goals, introduction of negative stimuli, and the removal of positive stimuli. These sources and lead to an affective state classified by depression, anger, disappointment, and a withdrawn state. This can also lead to antisocial behaviors like drug and alcohol use, violence and dropping out of school. Agnew’s theory can be seen in Nicole’s scenario. Her failure to achieve success in school can be reflected by detention, trouble understanding course material and assignments, and ultimately dropping out of school. There were many introductions of negative stimuli that can be seen in Nicole’s…

    • 553 Words
    • 3 Pages
    Good Essays