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: 50% (2 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...
-
Green Valley Company prepared the following trial balance at the end of its first year of operations ending December 31, 2014. To simplify the case, the amounts given are in thousands of dollars....
-
What roles might more recent analysis activities, such as data mining, predictive statistical analyses, and operational experiments, play in increasing organizational effectiveness?
-
Gemini, Inc., an all-equity firm, is considering an investment of $1.4 million that will be depreciated according to the straight-line method over its four-year life. The project is expected to...
-
(a) Prepare the journal entry for the issue of the bond. (List debit entry before credit entry. Credit account titles are automatically indented when the amount is entered. Do not indent manually. If...
-
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...
-
Graph the curves y = x 3 - 4x and x = y 3 - 4y and find their points of intersection correct to one decimal place.
-
How can you ensure that resource acquisition accordance with organisational requirements? Explain
-
In the figure below, two disks made of paper, with a distance d between them, are attached to a common shaft and rotate with an angular speed W . A bullet is fired towards the disks with speed v ....
-
What roles are played by the shareholders, upper management, and the board of directors in the strategic implementation process? Explain
-
What are the key challenges that face e-business during the strategy formulation process? Explain
-
(a) (b) Agatha and Beatrice set off from the same point at the same time. Agatha walks at a bearing of 120 at 5kmph. Beatrice walks at a bearing of 200 at a speed of 4. 8kmph. Calculate the distance...
-
Selected financial statement data for Jamestown Resorts for the year ending January 31, 2008, are as follows: For the year, net sales were $5,634 million, and cost of goods sold was $3,766 million....
-
A spacecraft has left the earth and is moving toward Mars. An observer on the earth finds that, relative to measurements made when the spacecraft was at rest, its a. length is shorter b. KE is less...
-
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.
-
Liquid B is flowing in laminar motion down a vertical wall. For z <0, the wall does not dissolve in the fluid, but for 0
-
Washington Countys Board of Representatives is considering the construction of a longer runway at the county airport. Currently, the airport can handle only private aircraft and small commuter jets....
-
LMN Co . produces a single product. The cost of producing and selling a single unit of this product at the company's normal activity level of 7 0 , 0 0 0 units per month is as follows: Direct...
Study smarter with the SolutionInn App