# Advanced Methods in Computer Graphics: With examples in OpenGL

## Ramakrishnan Mukundan

Language: English

Pages: 314

ISBN: 1447123395

Format: PDF / Kindle (mobi) / ePub

This book brings together several advanced topics in computer graphics that are important in the areas of game development, three-dimensional animation and real-time rendering. The book is designed for final-year undergraduate or first-year graduate students, who are already familiar with the basic concepts in computer graphics and programming. It aims to provide a good foundation of advanced methods such as skeletal animation, quaternions, mesh processing and collision detection. These and other methods covered in the book are fundamental to the development of algorithms used in commercial applications as well as research.

P3 , QP3 P1 , QP1 P2 to the area of the triangle P1 P2 P3 . In the following equations, the symbol denotes the signed area of a triangle: 1 D QP2 P3 ; P1 P2 P3 2 D QP3 P1 ; P1 P2 P3 3 D QP1 P2 P1 P2 P3 (2.48) The barycentric coordinates given in Eq. 2.48 are unique for every point on the plane of the triangle. They can be directly used to get the interpolated value of any quantity defined at the vertices of the triangle. If fP1 , fP2 , fP3 denote the values of some attribute

. . . . . . . . 8.1 Mesh Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . 8.2 Polygonal Manifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . 8.3 Mesh Data Structures .. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . 8.3.1 Face-Based Data Structure .. . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . 8.3.2

Relative Quaternions 103 Q2 Orientation-2 P2 Initial Configuration P Orientation-1 Relative quaternion Q1 P1 Fig. 5.18 The relative quaternion transforms an object from one orientation to another a rotation from the first orientation to the second. This relative quaternion can be easily obtained by noting how Q1 and Q2 transform points from one frame to another. In Fig. 5.18, the point P1 in Orientation-1 corresponds to the point P in the initial configuration. In other words, the

B2,0 (t) D 1. Thus we get the desired equation of the straight line connecting the two points: P .t/ D t3 t3 t t P1 C t2 t3 t2 P2 t2 (7.64) In this case, the knots t2 , t3 do not affect the shape of the parametric line. We shall now consider another example with five control points P1 : : : P5 on a twodimensional plane as shown in Fig. 7.21, and an approximating spline generated using second degree B-splines. Since we require a knot vector containing eight values, let us choose a uniformly

topology so that they could be used for fast traversal and processing of meshes. A large number of mesh operations extensively use information about mesh connectivity and local orientation around vertices. Mesh data structures also support efficient processing of incidence and adjacency queries. In this section, we consider one face-based and two edge-based data structures. 8.3 Mesh Data Structures 187 P1 T1 struct Triangle { Vertex *p1, *p2, *p3; Triangle *t1, *t2, *t3; }; P2 T3 P3 T2