CS 4722 COORDINATES Slide Set 2 03 Coordinates

  • Slides: 8
Download presentation
CS 4722

CS 4722

COORDINATES Slide Set 2. 03

COORDINATES Slide Set 2. 03

Coordinates ■ Locate a position in space by three numbers ■ An origin point

Coordinates ■ Locate a position in space by three numbers ■ An origin point specifies a starting point for coordinates to be measured ■ Three different directions, the axis directions are used – These are usually at right angles to each other ■ The combination of axes and the origin make a coordinate frame 3

Default Coordinate Frame ■ Open. GL defines a default coordinate frame based conceptually on

Default Coordinate Frame ■ Open. GL defines a default coordinate frame based conceptually on the display area – The origin is the center of the window displaying the rendered image – The positive x axis goes to the right – The positive y axis goes upwards – The positive z axis goes perpendicular to the screen ■ Which way does the positive z axis point? ■ Example on next slide demonstrates these observations 4

Orientation Example ■ Blue triangle – In negative z plane – Blue vertex at

Orientation Example ■ Blue triangle – In negative z plane – Blue vertex at positive y ■ Yellow triangle – In positive z plane – Yellow vertex at positive x ■ Blue triangle drawn first but depth testing is being used ■ exampe 3 A-coordinate-orientation project in module 03 solution 5

Default Clipping Volume ■ Open. GL will not display everything in a model being

Default Clipping Volume ■ Open. GL will not display everything in a model being rendered ■ One of the important ways in which the resulting image is limited is by clipping ■ This means not rendering some parts of a scene depending on their position – The parts of a scene that are rendered are considered to be inside the clipping volume ■ The clipping volume is typically a rectangular box or a closely related shape ■ The default clipping volume includes all points for which all three coordinates are in the range -1 to 1, inclusive 6

Default Virtual Camera ■ The rendering environment includes a virtual camera (or viewer) ■

Default Virtual Camera ■ The rendering environment includes a virtual camera (or viewer) ■ The goal of rendering is to display an image similar to what would be projected on to the film of the camera (or retina of the viewer) ■ In Open. GL the default camera is located at the origin and is pointed along the negative z axis ■ That is, the image captured by the camera should be very similar to what the viewer would be seeing if the scene were real 7

Different Coordinate Frames ■ These differ – In scale, what is the scale of

Different Coordinate Frames ■ These differ – In scale, what is the scale of measurements – In location, where the origin is – In orientation, what are the x, y, and z directions ■ We will use different coordinate frames to describe a single scene through different stages of rendering – A single position in space will potentially have different coordinates in each of these systems – Changing coordinates is the process of computing the coordinates of a position in one coordinate frame given the coordinates in a different frame ■ Modules 4 and 5 cover the techniques use to describe frames and to change coordinates 8