In Program 8.1, experiment with different settings for glPolygonOffset(), and observe the effects on shadow artifacts such
Question:
In Program 8.1, experiment with different settings for glPolygonOffset(), and observe the effects on shadow artifacts such as Peter Panning.
Program 8.1
Transcribed Image Text:
// Much is the same as we have seen before. New sections to support shadows are highlighted. // The imports necessary for lighting, etc., would be included at the start, are the same as before, // and are not shown here. public class Code extends JFrame implements GLEventListener { // variable declarations for rendering programs, buffers, shader sources, etc., would go here. private ImportedModel pyramid = new Imported Model("pyr.obj"); // define the pyramid private Torus myTorus = new Torus (0.6f, 0.4f, 48); // define the torus private int numPyramidVertices, num Torus Vertices, num TorusIndices; // locations of torus, pyramid, camera, and light private Vector3f torusLoc = new Vector3f(1.6, 0.0, -0.3); private Vector3f pyrLoc = new Vector3f(-1.0, 0.1, 0.3); private Vector3f cameraLoc = new Vector3f(0.0, 0.2, 6.0); private Vector3f lightLoc= new Vector3f(-3.8f, 2.2f, 1.1f); // properties of white light (global and positional) used in this scene private float[] globalAmbient = new float[] { 0.7f, 0.7f, 0.7f, 1.0f};
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 33% (3 reviews)
Answered By
Cyrus Sandoval
I a web and systems developer with a vast array of knowledge in many different front end and back end languages, responsive frameworks, databases, and best code practices. My objective is simply to be the best web developer that i can be and to contribute to the technology industry all that i know and i can do. My skills include:
- Front end languages: css, HTML, Javascript, XML
- Frameworks: Angular, Jquery, Bootstrap, Jasmine, Mocha
- Back End Languages: Java, Javascript, PHP,kotlin
- Databases: MySQL, PostegreSQL, Mongo, Cassandra
- Tools: Atom, Aptana, Eclipse, Android Studio, Notepad++, Netbeans.
Having a degree in Computer Science enabled me to deeply learn most of the things regarding programming, and i believe that my understanding of problem solving and complex algorithms are also skills that have and will continue to contribute to my overall success as a developer.
I’ve worked on countless freelance projects and have been involved with a handful of notable startups. Also while freelancing I was involved in doing other IT tasks requiring the use of computers from working with data, content creation and transcription.
5.00+
1+ Reviews
10+ Question Solved
Related Book For
Computer Graphics Programming In OpenGL With JAVA
ISBN: 9781683922193
2nd Edition
Authors: V. Scott Gordon PhD, John L. Clevenger PhD
Question Posted:
Students also viewed these Computer science questions
-
Test Program 12.5 with the layout specifier in the evaluation shader set to equal_spacing, and then to fractional_even_spacing, as described in Section 12.4. Observe the effects on the rendered...
-
Write a literature review for your study. See below for an example of a literature review. Your literature review should provide both analysis and synthesis of previous studies as related to the...
-
Identify the process evaluation article that you chose and explain why you selected this example. Describe the purpose of the evaluation, the informants, the questions asked, and the results of the...
-
Find the area under one arch of the cycloid x = a(t - sin t), y = a(1 - cos t).
-
Let X r [k] be the time-dependent Fourier transform (TDFT) defined in Eq. (10.36). For this problem, consider the TDFT when both the DFT length N = 36 and the sampling interval R = 36. Let the window...
-
The steel plate is 0.3 m thick and has a density of 7850 kg/m3. Determine the location of its center of mass. Also compute the reactions at the pin and rollersupport. y 3 2> 2 m 2 m B. y = -2 m
-
1 En qu difiere la publicidad competitiva de productos de la publicidad competitiva institucional?
-
Explain how a U.S. companys commitment to purchase inventory with settlement in foreign currency (FC) might become less attractive over time and how adverse effects on earnings could be reduced.
-
Sample MC for Midterm THE ACCOUNTING EQUATION A company's total liabilities decreased by $ 1 0 5 , 0 0 0 and its stockholders' equity decreased $ 3 5 , 0 0 0 during a period of time. By what amount...
-
Modify Program 2.5 to include the error-checking modules shown in Program 2.3. After you have that working, try inserting various errors into the shaders and observing both the resulting behavior and...
-
Modify Program 4.1 to replace the cube with some other simple 3D shape of your own design. Be sure to properly specify the number of vertices in the glDrawArrays() command. Program 4.1 Java/JOGL...
-
Which of the following is NOT an implication of Section 302 of the Sarbanes-Oxley Act? a. Auditors must determine, whether changes in internal control has, or is likely to, materially affect internal...
-
Explain the memory layout of a C program and discuss how different segments of memory are managed. ?
-
Explain the "volatile" keyword in C. Where and why would you use it?
-
What is the difference between malloc() and Calloc() ?
-
GATE-2024(Electrical Engineering) question. Q.10 A surveyor has to measure the horizontal distance from her position to a distant reference point C. Using her position as the center, a 200 m...
-
Regarding IRC Section 107, how many annotations are listed in the following services? a. Standard Federal Tax Reporter, Commerce Clearing House b. United States Tax Reporter, Research Institute of...
-
Catalytic hydrogenation of naphthalene over PdC results in rapid addition of 2 moles of H 2 . Propose a structure for this product.
-
Some critics argue that the Foreign Corrupt Practices Act puts U.S. businesses at a disa d vantage when competing in foreign markets with suppliers from other countries that do not have similar laws....
-
Discuss the concept of a marketing information system and why it is important for marketing managers to be involved in planning the system.
-
In your own words, explain why a decision support system (DSS) can add to the value of a marketing information system. Give an example of how a decision support system might help.
-
Accounting changes fall into one of three categories. Identify and explain these categories and give an example of each one.
-
Machinery is purchased on May 15, 2015 for $120,000 with a $10,000 salvage value and a five year life. The half year convention is followed. What method of depreciation will give the highest amount...
-
Flint Corporation was organized on January 1, 2020. It is authorized to issue 14,000 shares of 8%, $100 par value preferred stock, and 514,000 shares of no-par common stock with a stated value of $2...
Study smarter with the SolutionInn App