• Home
  • Textbooks
  • Computer Graphics with Open GL
  • Graphics Output Primitives

Computer Graphics with Open GL

Donald Hearn. M. Pauline. Baker, Warren R.Carithers

Chapter 3

Graphics Output Primitives - all with Video Answers

Educators


Chapter Questions

16:22

Problem 1

Set up geometric data tables as in Figure 16 for a square pyramid (a square base with four triangular sides that meet at a pinnacle).

Tp Sarathy
Tp Sarathy
Numerade Educator
01:23

Problem 2

Set up geometric data tables for a square pyramid using just a vertex table and a surface-facet table, then store the same information using just the surface-facet table. Compare the two methods for representing the unit cube with a representation using the three tables in the previous exercise. Estimate the storage requirements for each.

Sriram Soundarrajan
Sriram Soundarrajan
Numerade Educator
01:48

Problem 3

Set up a procedure for establishing the geometric data tables for any input set of points defining the polygon facets for the surface of a threedimensional object.

Ali Soave
Ali Soave
Numerade Educator
03:42

Problem 4

Devise routines for checking the three geometric data tables in Figure 16 to ensure consistency and completeness.

Raymond Matshanda
Raymond Matshanda
Numerade Educator
06:07

Problem 5

Calculate the plane parameters $A, B, C$, and $D$ for each face of a unit cube centered at the world coordinate origin.

Zachary Warner
Zachary Warner
Numerade Educator
07:28

Problem 6

Write a program for calculating parameters $A, B, C$, and $D$ for an input mesh of polygon-surface facets.

Harriet O'Brien
Harriet O'Brien
Numerade Educator
00:47

Problem 7

Write a procedure to determine whether an input coordinate position is in front of a polygon surface or behind it, given the plane parameters $A, B, C$, and $D$ for the polygon.

Amy Jiang
Amy Jiang
Numerade Educator
02:42

Problem 8

Write a procedure to determine whether a given point is inside or outside of a cube with a given set of coordinates.

AG
Ankit Gupta
Numerade Educator
03:11

Problem 9

If the coordinate reference for a scene is changed from a right-handed system to a left-handed system, what changes could we make in the values of surface plane parameters $A, B, C$, and $D$ to ensure that the orientation of the plane is correctly described?

Varsha Aggarwal
Varsha Aggarwal
Numerade Educator
04:10

Problem 10

Given that the first three vertices, $V_{1}, V_{2}$, and $V_{3}$, of a pentagon have been used to calculate plane parameters $A=15, B=21, C=9, D=0$, determine from the final two vertices $V_{4}=(2,-1,-1)$ and $V_{5}=(1,-2,2)$ whether the pentagon is planar or non-planar.

Gideon Idumah
Gideon Idumah
Numerade Educator
00:12

Problem 11

Develop a procedure for identifying a nonplanar vertex list for a quadrilateral.

Amrita Bhasin
Amrita Bhasin
Numerade Educator
01:58

Problem 12

Extend the algorithm of the previous exercise to identify a nonplanar vertex list that contains more than four coordinate positions.

Geno Ellis
Geno Ellis
Numerade Educator
01:37

Problem 13

Write a procedure to split a set of four polygon vertex positions into a set of triangles.

Ashley High
Ashley High
Numerade Educator
07:29

Problem 14

Split the octagon given by the list of vertices $V_{1}, V_{2}$, $V_{3}, V_{4}, V_{5}, V_{6}, V_{7}, V_{8}$ into a set of triangles and give the vertices that make up each triangle.

Gladys Fowler
Gladys Fowler
Numerade Educator
04:21

Problem 15

Devise an algorithm for splitting a set of $n$ polygon vertex positions, with $n>4$, into a set of triangles.

Willis James
Willis James
Numerade Educator
05:12

Problem 16

Set up an algorithm for identifying a degenerate polygon vertex list that may contain repeated vertices or collinear vertices.

Carson Merrill
Carson Merrill
Numerade Educator
04:21

Problem 17

Devise an algorithm for identifying a polygon vertex list that contains intersecting edges.

Willis James
Willis James
Numerade Educator
00:49

Problem 18

Write a routine to identify concave polygons by calculating cross-products of pairs of edge vectors.

Luca Alexander
Luca Alexander
Numerade Educator
00:26

Problem 19

Write a routine to split a concave polygon, using the vector method.

James Kiss
James Kiss
Numerade Educator
00:56

Problem 20

Write a routine to split a concave polygon, using the rotational method.

Charles Carter
Charles Carter
Numerade Educator
04:21

Problem 21

Devise an algorithm for determining interior regions for any input set of vertices using the nonzero winding-number rule and cross-product calculations to identify the direction for edge crossings.

Willis James
Willis James
Numerade Educator
04:21

Problem 23

Devise an algorithm for determining interior regions for any input set of vertices using the nonzero winding-number rule and dot-product calculations to identify the direction for edge crossings.

Willis James
Willis James
Numerade Educator
05:17

Problem 24

Write a routine to implement a text-string function that has two parameters: one parameter specifies a world-coordinate position and the other parameter specifies a text string.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
05:17

Problem 25

Write a routine to implement a polymarker function that has two parameters: one parameter is the character that is to be displayed and the other parameter is a list of world-coordinate positions.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
01:47

Problem 26

Modify the example program in Section 16 so that the displayed hexagon is always at the center of the display window, regardless of how the display window may be resized.

Nick Johnson
Nick Johnson
Numerade Educator
14:49

Problem 27

Write a complete program for displaying a bar chart. Input to the program is to include the data points and the labeling required for the $x$ and $y$ axes. The data points are to be scaled by the program so that the graph is displayed across the full area of a display window.

Brian Ketelobeter
Brian Ketelobeter
Numerade Educator
14:49

Problem 28

Write a program to display a bar chart in any selected area of a display window.

Brian Ketelobeter
Brian Ketelobeter
Numerade Educator
03:38

Problem 29

Write a procedure to display a line graph for any input set of data points in any selected area of the screen, with the input data set scaled to fit the selected screen area. Data points are to be displayed as asterisks joined with straight-line segments, and the $x$ and $y$ axes are to be labeled according to input specifications. (Instead of asterisks, small circles or some other symbols could be used to plot the data points.)

AN
Anjali Nagulpally
Numerade Educator
14:14

Problem 30

Using a circle function, write a routine to display a pie chart with appropriate labeling. Input to the routine is to include a data set giving the distribution of the data over some set of intervals, the name of the pie chart, and the names of the intervals. Each section label is to be displayed outside the boundary of the pie chart near the corresponding pie section.

Brian Ketelobeter
Brian Ketelobeter
Numerade Educator