6 - Computergraphik [ID:12133]
50 von 733 angezeigt

So, good morning. Welcome for computer graphics lecture. Today we will speak about, again,

about transformations. So, I already spoke a little bit about transformations when we,

so I think it even was in the first or rather early in the beginning, I already made a brief

introduction to homogeneous coordinates and why they are very convenient. And on Monday,

when we spoke about WebGL and GPU-based graphics, we also came back to transformations when we

looked into vertex shaders. Maybe you remember I had that simple example where we were rasterizing

a square and then I've also shown a vertex shader that rotated that square and scaled

it a little bit. And in fact, this is the major thing usually that happens in a vertex

shader, that is that it transforms the objects that are modeled in some space in some size

or in some arbitrary units and to scale that and to orient it so that it's rendered at

the proper position in our window. And this all is described by transformations. And later

on next week, we will learn that if we have now three-dimensional worlds, then we have

3D coordinates in our world and somehow we have to map these to 2D image coordinates.

And this is essentially what a camera does. It takes our 3D world and it makes a 2D image

of that world and this is what we will describe using also such transformations here. And

this is a perspective transformation. This is more complicated than these affine transformations

that we did up to now. And this is what we will work towards now. And next week then

we will see how does three-dimensional projection, how does perspective work and how can we

describe it also using such matrices. And once we know that, we made the step from 2D

graphics to 3D graphics and from then on we will think in 3D worlds and look at real 3D

graphics. Okay, so transformations. Just a little recap to remember what we already

learned in lecture two. We were speaking about affine transformations and we saw which classes

of affine transformations we have like rigid transformations or similarity transformations.

We looked at particular transformations like translations, rotations, etc. and at homogeneous

coordinates. And today we will learn a little bit more about homogeneous coordinates. We

will look at the differences between points and vectors and normals. And we will make

a first view, a first introduction to projective transformations. Projective transformations

is now a larger class than affine transformations and in fact it's the set of transformations

that we will need to also describe perspective, which is a special type of projective transformations.

Okay, so short recap. Affine transformations can, or at least for me, they are easiest to

understand as a coordinate system change. So the idea is that we have an object described

in some coordinate system, some local coordinate system in some physical unit or in some any

unit, inches, meters, kilometers, centimeters, millimeters whatsoever. And now to bring it

on screen we define a new coordinate system. We say, okay, the origin of the object should

be at this space on screen and the object is spawned by two coordinate basis vectors.

And now the coordinates of that object are interpreted as coordinates in that coordinate

system here. And by this we can position an object on the screen by moving the origin

and we can scale the object by scaling the axis and we can rotate by rotating the axis.

And if we take basis vectors, axes that are not perpendicular, we can even skew. And this

is an affine transformation and it is described by three vectors or, yeah, we will see there

is a difference between points and vectors. So it is described by the origin and by the

two basis vectors. Yeah? And this can be described like this here. In this form, x and y are

coordinates, yeah? So these are the original coordinates of that object and with this mapping

they are transformed now to coordinates on the screen, yeah, to image coordinates. Last

Monday you learned that, for instance, in OpenGL coordinates go from minus one to one,

yeah? And so these vectors here are defined in this coordinate system and by this we can

position objects on the screen. And, yeah, we cannot only describe or what we can describe

with this are all these affine transformations. The most important ones are translations,

rotations, scalings, shearings, even reflections, yeah, can be described this way. Okay, and

we also saw that it's, or maybe I could convince you that it's a very elegant way to describe

Teil einer Videoserie :

Zugänglich über

Offener Zugang

Dauer

01:32:00 Min

Aufnahmedatum

2019-10-31

Hochgeladen am

2019-11-02 13:09:03

Sprache

de-DE

Einbetten
Wordpress FAU Plugin
iFrame
Teilen