Download presentation
Presentation is loading. Please wait.
1
THREE-DIMENSIONAL VIEWING I
12 고려대학교 컴퓨터 학과 김 창 헌
2
Contents Classification of Planar Projections Parallel Projection
Isometric Projection Oblique Projection Perspective projection Vanishing Point Special techniques
3
In 3D viewing system... void mouse(int button, int state, int x, int y) {...} void myReshape(int w, int h) { glMatrixMode(GL_PROJECTION); glLoadIdentity(); // gluPerspective(45.0, (GLfloat)h/ (GLfloat)w, 0.1, ); glOrtho(-10.0,10.0,-10.0,10.0,10.0,200.0); glMatrixMode(GL_MODELVIEW); glViewport(0,0,w,h); } void main() glutInitWindowSize(500, 500); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutCreateWindow(”Cylinder mapping program"); LoadTexture(); PencilObj = gluNewQuadric(); gluQuadricTexture(PencilObj, GL_TRUE); glutReshapeFunc(myReshape); glutDisplayFunc(display); glutMouseFunc(mouse); glutMotionFunc(motion); glutMainLoop(); #include < Header files...> #define CONSTANTS... // declare global variables.. void display (void) { glEnable(GL_TEXTURE_2D); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glClearColor(1.0,1.0,1.0,1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(90.0,-1.0,0.0,0.0); glRotatef(angle1, 0.0, 1.0, 0.0); glRotatef(angle2, 1.0, 0.0, 0.0); gluQuadricNormals(PencilObj, GLU_FLAT); gluQuadricDrawStyle(PencilObj, GLU_FILL); glCallList(Texture); gluCylinder(PencilObj, 8.0, 8.0, 10.0, 20, 1); glPopMatrix(); glFlush(); glutSwapBuffers(); }
4
Classification of Planar Projections
Parallel Perspective Oblique Orthographic 1-pt 2-pt 3-pt Multiview Orthographic Cavalier Cabinet Axonometric Isometric Dimetric Trimetric
5
Projections Parallel Projection Perspective Projection
6
Parallel Projection Orthographic parallel projection
the projection is perpendicular to the view plane Oblique parallel projection The projectors are inclined with respect to the view plane
7
Orthographic Projection
Multiview orthographic Singlview orthographic - Axonometric projection - The planes of the object remain parallel to the principle planes of projection - Orthographic projections that display more than one face of an object - The planes of the object are inclined with respect to the projection plane
8
Orthographic coordinates
9
Isometric Projection Definition
- The most commonly used axonometric projection - Aligning the projection plane so that it intersects each coordinate axis in which the object is defined at the same distance from the origin - The angles between the principal axis are all equal to 120º Isometric axis Isometric Axonometric
10
Isometric Projection(con’t)
11
Isometric Projection(con’t)
The projections of the unit vectors are found as follows: The projected length of each unit vector is So, the condition for the isometric projection is, (1) (2)
12
Isometric Projection(con’t)
A and, Foreshortening ratio F :
13
Oblique projection
14
Oblique projection(con’t)
15
Oblique projection(con’t)
Cavalier projection ( ) Cabinet projection ( )
16
Perspective Projection
17
Perspective Projection (con’t)
18
Perspective Projection(con’t)
Orthographic projection Perspective transformation Center of Projection on the x axis Center of Projection on the y axis
19
Perspective Projection(con’t)
2-point perspectives 3-point perspectives
20
Vanishing point - When using perspective transformation equations, any set of parallel lines in the object that are not parallel to the plane are projected into converging lines. - The point at which a set of projected parallel lines appears to converge is called a vanishing point. - A scene can have any number of vanishing points, depending on how many sets of parallel lines there are in the scene
21
Principal vanishing point
The vanishing point for any set of lines that are parallel to one of the principal axis of an object One-point perspective projection Two-point perspective projection Three-point perspective projection
22
Vanishing point a’ a Vanishing line View plane Vanishing Point
Projection Center a’ a
23
Vanishing point(con’t)
View plane If lines are parallel to the projection plane, then no vanishing point.
24
Special techniques Two point Perspective One point Perspective
Three point Perspective
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.