6 - Computergraphik [ID:10269]
50 von 768 angezeigt

OK, so welcome for the computer graphics lecture.

Today we're going to speak about an algorithm

for the rasterization of lines.

And I already introduced on Tuesday a few considerations.

So what is, in fact, the problem that we want to solve?

And so the input for this algorithm

is a starting point and an end point.

And we want to connect these, or we

want to rasterize the line connecting the two.

And now since such a line has no real thickness,

it's not really clear what is meant by that.

So one possible interpretation would

be to rasterize all the pixels that are touched by the line.

However, that would result in rather thick lines that

don't look very good on the screen.

And the approximation we want to achieve now, for now,

we will come back to another solution in the end,

looks like this, that we say we want

to have the thinnest connected representation of the line

from here to here.

So for such a line, that means for every x value,

we want to have one particular y value where a pixel is set.

So this is a rather thin representation.

That also means that if we have a 45 degree slope,

like this here, we see that the line is rather thin.

Compared to the length of the line,

only six pixels are set for that example.

Whereas if we would have a horizontal line,

for a shorter distance, also six pixels would be used.

So the diagonal lines look a bit thinner.

But we will see how we can also solve that.

OK, so now let's go to the algorithm.

So given is a starting point and an end point.

And we want to connect these.

And for simple slopes of the line, that's quite easy.

If we have a 45 degree slope, then we

can always just go to the right and to the top

and just set these diagonal pixels.

If we have a slope like 4 over 8 or 1 over 2, it's also simple.

We always go once to the east and then northeast, east,

northeast, east, northeast.

But if we have a not that nice and easy slope,

then we have to think about something different.

And so for now, we will only handle or look at the case

that the slope is between 0 and 1.

That means we have a slope.

So that's the steepest that we will look at.

And a slope of 0 just means a horizontal line.

And we will look at all slopes in between these two.

All other cases can be handled by symmetry.

Teil einer Videoserie :

Zugänglich über

Offener Zugang

Dauer

00:47:26 Min

Aufnahmedatum

2013-10-31

Hochgeladen am

2019-04-04 16:19:03

Sprache

de-DE

Die Vorlesung gibt eine Einführung in die Computergraphik:
  • Graphik Pipeline

  • Clipping

  • 3D Transformationen

  • Hierarchische Display Strukturen

  • Perspektive und Projektionen

  • Visibilitätsbetrachtungen

  • Rastergraphik und Scankonvertierung

  • Farbmodelle

  • Lokale und globale Beleuchtungsmodelle

  • Schattierungsverfahren

  • Ray Tracing und Radiosity

  • Schatten und Texturen

Empfohlene Literatur
  • P. Shirley: Fundamentals of Computer Graphics. AK Peters Ltd., 2002
  • Hearn, M. P. Baker: Computer Graphics with OpenGLD. Pearson

  • Foley, van Dam, Feiner, Hughes: Computer Graphics - Principles and Practice

  • Rauber: Algorithmen der Computergraphik

  • Bungartz, Griebel, Zenger: Einführung in die Computergraphik

  • Encarnação, Strasser, Klein: Computer Graphics

Einbetten
Wordpress FAU Plugin
iFrame
Teilen