ΠΑΝΕΠΙΣΤΗΜΙΟ ΙΩΑΝΝΙΝΩΝ ΑΝΟΙΚΤΑ ΑΚΑΔΗΜΑΪΚΑ ΜΑΘΗΜΑΤΑ Γραφικά Υπολογιστών και Συστήματα Αλληλεπίδρασης Απεικόνιση τρισδιάστατης σκηνής Διδάσκων: Αν. Καθ. Ιωάννης Φούντος
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons. Για εκπαιδευτικό υλικό, όπως εικόνες, που υπόκειται σε άλλου τύπου άδειας χρήσης, η άδεια χρήσης αναφέρεται ρητώς.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-1 Coordinate reference for obtaining a selected view of a three-dimensional scene.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-2 Three parallel-projection views of an object, showing relative proportions from different viewing positions.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-3 The wire-frame representation of the pyramid in (a) contains no depth information to indicate whether the viewing direction is (b) downward from a position above the apex or (c) upward from a position below the base.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-4 A wire-frame object displayed with depth cueing, so that the brightness of lines decreases from the front of the object to the back.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-5 Photographing a scene involves selection of the camera position and orientation.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-6 General three-dimensional transformation pipeline, from modeling coordinates (MC) to world coordinates (WC) to viewing coordinates (VC) to projection coordinates (PC) to normalized coordinates (NC) and, ultimately, to device coordinates (DC).
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-7 A right-handed viewing-coordinate system, with axes x view, y view, and z view, relative to a right-handed world-coordinate frame.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-8 Orientation of the view plane and view-plane normal vector N.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure 10-9 Three possible positions for the view plane along the z view axis.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Specifying the view-plane normal vector N as the direction from a selected reference point P ref to the viewing-coordinate origin P 0.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Adjusting the input direction of the view-up vector V to an orientation perpendicular to the view-plane normal vector N.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A right-handed viewing system defined with unit vectors u, v, and n.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Panning across a scene by changing the viewing position, with a fixed direction for N.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Viewing an object from different directions using a fixed reference point.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Parallel projection of a line segment onto a view plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Perspective projection of a line segment onto a view plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Orthogonal projections of an object, displaying plan and elevation views.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure An isometric projection of a cube.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure An orthogonal projection of a spatial position onto a view plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A clipping window on the view plane, with minimum and maximum coordinates given in the viewing reference system.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Infinite orthogonal-projection view volume.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A finite orthogonal view volume with the view plane “in front” of the near plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A left-handed screen- coordinate reference frame.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Normalization transformation from an orthogonal- projection view volume to the symmetric normalization cube within a left-handed reference frame.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure An oblique parallel projection of a cube, shown in a top view (a), produces a view (b) containing multiple surfaces of the cube.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure An oblique parallel projection of coordinate position (x, y, z) to position (x p, y p, z vp ) on a projection plane at position z vp along the z view axis.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure An oblique parallel projection (a) of a cube (top view) onto a view plane that is coincident with the front face of the cube produces the combination front, side, and top view shown in (b).
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Cavalier projections of a cube onto a view plane for two values of angle Φ. The depth of the cube is projected with a length equal to that of the width and height.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Cabinet projections of a cube onto a view plane for two values of angle Φ. The depth is projected with a length that is one half that of the width and height of the cube.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Oblique parallel projection of position (x, y, z) to a view plane along a projection line defined with vector V P.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Top view of a finite view volume for an oblique parallel projection in the direction of vector V P.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Top view of an oblique parallel-projection transformation. The oblique view volume is converted into a rectangular parallelepiped, and objects in the view volume, such as the green block, are mapped to orthogonal-projection coordinates.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A perspective projection of two equal-length line segments at different distances from the view plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A perspective projection of a point P with coordinates (x, y, z) to a selected projection reference point. The intersection position on the view plane is (x p, y p, z vp ).
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A perspective-projection view of an object is upside down when the projection reference point is between the object and the view plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Changing perspective effects by moving the projection reference point away from the view plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Principal vanishing points for perspective-projection views of a cube. When the cube in (a) is projected to a view plane that intersects only the z axis, a single vanishing point in the z direction (b) is generated. When the cube is projected to a view plane that intersects both the z and x axes, two vanishing points (c) are produced.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure An infinite, pyramid view volume for a perspective projection.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A perspective-projection frustum view volume with the view plane “in front” of the near clipping plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A symmetric perspective-projection frustum view volume, with the view plane between the projection reference point and the near clipping plane. This frustum is symmetric about its centerline when viewed from above, below, or either side.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Field-of-view angle θ for a symmetric perspective-projection view volume, with the clipping window between the near clipping plane and the projection reference point.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Relationship between the field-of-view angle θ, the height of the clipping window, and the distance between the projection reference point and the view plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Increasing the size of the field-of-view angle increases the height of the clipping window and increases the perspective- projection foreshortening.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A symmetric frustum view volume is mapped to an orthogonal parallelepiped by a perspective- projection transformation.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure An oblique frustum, as viewed from at least one side or a top view, with the view plane positioned between the projection reference point and the near clipping plane.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Normalization transformation from a transformed perspective- projection view volume (rectangular parallelepiped) to the symmetric normalization cube within a left-handed reference frame, with the near clipping plane as the view plane and the projection reference point at the viewing- coordinate origin.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Default orthogonal-projection view volume. Coordinate extents for this symmetric cube are from −1 to +1 in each direction. The near clipping plane is at z near = 1, and the far clipping plane is at z far = −1.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Output display generated by the three-dimensional viewing example program.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure A possible ordering for the view-volume clipping boundaries corresponding to the region-code bit positions.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Values for the three-dimensional, six-bit region code that identifies spatial positions relative to the boundaries of a view volume.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Three-dimensional region codes for two line segments. Line P 1 P 2 intersects the right and top clipping boundaries of the view volume, while line P 3 P 4 is completely below the bottom clipping plane. __
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Three-dimensional object clipping. Surface sections that are outside the view-volume clipping planes are eliminated from the object description, and new surface facets may need to be constructed.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Clipping a line segment against a plane with normal vector N.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Figure Clipping the surfaces of a pyramid against a plane with normal vector N. The surfaces in front of the plane are saved, and the surfaces of the pyramid behind the plane are eliminated.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Table 10-1 Summary of OpenGL Three-Dimensional Viewing Functions
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Τέλος Ενότητας
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Χρηματοδότηση Το παρόν εκπαιδευτικό υλικό έχει αναπτυχθεί στα πλαίσια του εκπαιδευτικού έργου του διδάσκοντα. Το έργο «Ανοικτά Ακαδημαϊκά Μαθήματα στο Πανεπιστήμιο Ιωαννίνων» έχει χρηματοδοτήσει μόνο τη αναδιαμόρφωση του εκπαιδευτικού υλικού. Το έργο υλοποιείται στο πλαίσιο του Επιχειρησιακού Προγράμματος «Εκπαίδευση και Δια Βίου Μάθηση» και συγχρηματοδοτείται από την Ευρωπαϊκή Ένωση (Ευρωπαϊκό Κοινωνικό Ταμείο) και από εθνικούς πόρους.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Σημειώματα
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Σημείωμα Ιστορικού Εκδόσεων Έργου Το παρόν έργο αποτελεί την έκδοση 1.0. Έχουν προηγηθεί οι κάτωθι εκδόσεις: Έκδοση 1.0 διαθέσιμη εδώ.
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Σημείωμα Αναφοράς Copyright Πανεπιστήμιο Ιωαννίνων, Διδάσκων: Αν. Καθ. Ιωάννης Φούντος. «Γραφικά Υπολογιστών και Συστήματα Αλληλεπίδρασης. Απεικόνιση τρισδιάστατης σκηνής». Έκδοση: 1.0. Ιωάννινα Διαθέσιμο από τη δικτυακή διεύθυνση:
Copyright ©2011, ©2004 by Pearson Education, Inc. All rights reserved. Computer Graphics with OpenGL ®, Fourth Edition Donald Hearn M. Pauline Baker Warren R. Carithers Σημείωμα Αδειοδότησης Το παρόν υλικό διατίθεται με τους όρους της άδειας χρήσης Creative Commons Αναφορά Δημιουργού - Μη Εμπορική Χρήση – Όχι Παράγωγα Έργα, Διεθνής Έκδοση 4.0 [1] ή μεταγενέστερη. [1] Ως Μη Εμπορική ορίζεται η χρήση: που δεν περιλαμβάνει άμεσο ή έμμεσο οικονομικό όφελος από την χρήση του έργου, για το διανομέα του έργου και αδειοδόχο. που δεν περιλαμβάνει οικονομική συναλλαγή ως προϋπόθεση για τη χρήση ή πρόσβαση στο έργο. που δεν προσπορίζει στο διανομέα του έργου και αδειοδόχο έμμεσο οικονομικό όφελος (π.χ. διαφημίσεις) από την προβολή του έργου σε διαδικτυακό τόπο. Ο δικαιούχος μπορεί να παρέχει στον αδειοδόχο ξεχωριστή άδεια να χρησιμοποιεί το έργο για εμπορική χρήση, εφόσον αυτό του ζητηθεί.