1. El Modelo deCmaraIng. Andrs Adolfo NavarroNewball MSc,
PhD
2. Definicin Cmara u observador Parmetros habilitan
transformaciones para cambiar de estado en la tubera grfica Hace
posible caminar dentro de una escena en 3D.
3. ConstruccinElementos Dos vectores Un punto 3D Una distancia
al plano de proyeccin
4. Construccin Zm C[Cx, Cy, Cz] elevacin d azimuth YmXm
5. Zc normal y positivo hacia el plano de Construccinproyeccin
Zm D C[Cx, Cy, Cz] Zc Y X m m
6. ConstruccinYc es la orientacindel plano de proyeccin Zm Yc
900 C[Cx, Cy, Cz] Zc Ym Xm
7. Construccin Zm Yc Xc C[Cx, Cy, Cz] Zc Ym Xm
8. ConstruccinZcx = sen cosZcy = sen senZcz = cosYc indicado
por el usuario para dar la orientacinYc = Yc - (Yc.Zc) ZcXc = Zc x
Yc
9. Hacia el paso dos de la tubera grficaPc = Tc PmTc = BT Xcx
Xcy Xcz 0 1 0 0 Cx Ycx Ycy Ycz 0 0 1 0 Cy B T Zcx Zcy Zcz 0 0 0 1
Cz 0 0 0 1 0 0 0 1
10. Hacia el paso dos de la tubera grfica Yc Pc[Xc, Yc, Zc]
Pp[Xp, Yp] C D Zc Xc
11. Hacia el paso dos de la tubera grfica Field of view FOV =
2*tan-1(S/D) (radianes) Plano de proyeccin FOVObservador, C D
S/2
12. Proyeccin al plano lgicoCambios de dimensinTipos:
Perspectiva Paralela
13. Perspectiva Tiene un centro de proyeccin (observador) El
tamao de la imagen proyectada depende de la distancia Lnea de
proyeccin Plano Plano Objeto Imagen Objeto Cmara s C, Centro de
proyeccin
14. Perspectiva DObservador Zc Xp Xc P[Xc, Yc, Zc] Yc P[Xc, Yc,
Zc] YpObservador Zc D
15. Perspectiva Xp / D = Xc / Zc Yp /D = Yc / Zc Xp = Xc /
(Zc/D) Yp = Yc / (Zc/ D) Pp = Tpers Pc 1 0 0 0 0 1 0 0 Tpers 0 0 1
0 0 0 1/ D 0
16. Paralela u Ortogonal No hay centro de proyeccin Lneas de
proyeccin paralelas y perpendiculares al plano El tamao de la
imagen no depende de la distancia Lnea de proyeccin Xp = Xc Yp =Yc
Imagen Lnea de proyeccin Zv =0 Plano Pp=Torto Pc Objetos 1 0 0 1 0
1 0 1 Torto 0 0 0 1 0 0 0 1
17. Despliegue en la ventanafsica Convetir de UMM a pixels
[Xmax/2 UMM, Ymax/2 UMM, D] Zc [-Xmax/2 UMM, -Ymax/2 UMM, D]
18. Despliegue en la ventanafsica Xmax UMM Xpixels Xp UMM Xp= ?
Ymax UMM Ypixels Yp UMM Yp =? Yp = -Yp + Yp/2 Xp= Xp + Xp/2
19. Anatomy of a rendering pipeline 3) Rotate and translate the
geometry from worldLocal space space to viewing or camera space. At
this stage, all vertices are positioned relativeWorld space to the
point of view of the camera. (The world really does revolve around
you!) For example, a cube at (10,000, 0, 0) viewedViewing space
from a camera (9,999, 0, 0) would now have relative position (1, 0,
0). Rotations would3D screen space have similar effect. This makes
operations such as clipping and hidden-object removal much
faster.2D display space
20. Anatomy of a rendering pipeline 4) Perspective: Transform
the viewing frustrumLocal space into an axis-aligned box with the
near clip plane at z=0 and the far clip plane at z=1.World space
Coordinates are now in 3D screen space. This transformation is not
affine: angles will distort and scales change.Viewing space
Hidden-surface removal can be accelerated here by clipping objects
and primitives against3D screen space the viewing frustrum.
Depending on implementation this clipping could be before
transformation or after or both.2D display space
21. Anatomy of a rendering pipeline 5) Collapse the box to a
plane. RasterizeLocal space primitives using Z-axis information for
depth-sorting and hidden-surface-removal.World space Clip
primitives to the screen. Scale raster image to the final raster
buffer and rasterize primitives.Viewing space3D screen space2D
display space
22. Bibliografa Watt Hearn Foley Prcticas de Informtica Grfica
(Versin 11)Dr. Arno Formella OpenGL Programming Guide: The Official
Guide to Learning OpenGL, Versions 3.0 and 3.1 (7th Edition) by
Dave Shreiner and The Khronos OpenGL ARB Working Group, 2009 Alex
Benton, University of Cambridge