30
Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II LineWidth ( 5.0 ); Begin ( GL_LINES ); Color4f ( 0.0f, 0.0f, 1.0f, 1.0f ); Vertex3f ( -0.9f, 0.0f, 0.0f ); Color4f ( 0.0f, 1.0f, 0.0f, 1.0f ); Vertex3f ( -0.2f, 0.8f, 0.0f ); Vertex3f ( +0.2f, 0.8f, 0.0f ); Color4f ( 1.0f, 0.0f, 0.0f, 1.0f ); Vertex3f ( +0.9f, 0.0f, 0.0f ); End ( );

Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Embed Size (px)

Citation preview

Page 1: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Lineare Interpolation - Beispiel

VisualisierungstechnikenGDV II

glLineWidth ( 5.0 );

glBegin ( GL_LINES );glColor4f ( 0.0f, 0.0f, 1.0f, 1.0f );glVertex3f ( -0.9f, 0.0f, 0.0f );glColor4f ( 0.0f, 1.0f, 0.0f, 1.0f );glVertex3f ( -0.2f, 0.8f, 0.0f );glVertex3f ( +0.2f, 0.8f, 0.0f );glColor4f ( 1.0f, 0.0f, 0.0f, 1.0f );glVertex3f ( +0.9f, 0.0f, 0.0f );glEnd ( );

Page 2: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Lineare Interpolation der Farbe

VisualisierungstechnikenGDV II

ROT MAGENTA BLAU

1

0

ROT-Anteil BLAU-Anteil

t

0 1

Lineare Interpolation der Farbe

Page 3: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Bilineare Interpolation - Beispiel

VisualisierungstechnikenGDV II

glBegin(GL_QUADS);

glColor4f ( 0.0f, 0.0f, 1.0f, 1.0f );glVertex3f(-0.9f, 0.0f, 0.0f );glColor4f ( 0.0f, 1.0f, 0.0f, 1.0f );glVertex3f(-0.2f, 0.8f, 0.0f );glVertex3f(+0.2f, 0.8f, 0.0f );glColor4f ( 1.0f, 0.0f, 0.0f, 1.0f );glVertex3f(+0.9f, 0.0f, 0.0f );

glEnd();

Page 4: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Bilineare Interpolation

VisualisierungstechnikenGDV II

2. Lineare Interpolation

2. Lineare Interpolation

1. Zerlegung in Dreiecke

3. Bilineare Interpolation

Page 5: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gebündeltes Licht auf Fläche

VisualisierungstechnikenGDV II

Erwünschtes Resultat Erzieltes Resultat

Page 6: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gebündeltes Licht auf Fläche

VisualisierungstechnikenGDV II

Erwünschtes Resultat Dreieckzerlegung und vertices

Page 7: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Flat Shading 1

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Vom Folgedreieck überzeichnete Kante

Page 8: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gouraud Shading 1

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 9: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Flat Shading 2

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 10: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gouraud Shading 2

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 11: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Flat Shading 3

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Vom Folgedreieck überzeichnete Kante

Page 12: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gouraud Shading 3

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 13: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Flat Shading 4

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 14: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gouraud Shading 4

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 15: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Flat Shading 5

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 16: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gouraud Shading 5

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 17: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Flat Shading 6

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Page 18: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Gouraud Shading 6

VisualisierungstechnikenGDV II

glPolygoneMode(GL_LINE) Resultat für Fläche

Fläche in 30 x 30 Rechtecke unterteilt

Page 19: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Flat- Gouraud- und Phong Shading

VisualisierungstechnikenGDV II

Page 20: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Ray Casting (Prinzip)

VisualisierungstechnikenGDV II

COP

„Schattenfühler“

Page 21: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Rekursives Ray Tracing (Prinzip)

VisualisierungstechnikenGDV II

COP

Page 22: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Rekursives Ray Tracing (Beispiel 1)

VisualisierungstechnikenGDV II

Watt A., Policarpo F.The Computer ImageAddison-Wesley 1998

Page 23: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Rekursives Ray Tracing (Beispiel 2)

VisualisierungstechnikenGDV II

Watt A., Policarpo F.The Computer ImageAddison-Wesley 1998

Page 24: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Radiosity (Beispiel)

VisualisierungstechnikenGDV II

Watt A., Policarpo F.The Computer ImageAddison-Wesley 1998

Page 25: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Vergleich der Verfahren

VisualisierungstechnikenGDV II

Watt A., Policarpo F.The Computer ImageAddison-Wesley 1998

lo:Flat Shading

lm:Gouraud Shading

ro:Phong Shading

mu:Ray Tracing

ru:Radiosity

Page 26: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Chernoff Face

VisualisierungstechnikenGDV II

Page 27: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Chernoff Faces

VisualisierungstechnikenGDV II

Page 28: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Beispiele

VisualisierungstechnikenGDV II

Page 29: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Beispiele

VisualisierungstechnikenGDV II

Page 30: Prof. Dr. W. Kestner Lineare Interpolation - Beispiel Visualisierungstechniken GDV II glLineWidth ( 5.0 ); glBegin ( GL_LINES ); glColor4f ( 0.0f, 0.0f,

Prof. Dr. W. Kestner

Beispiele

VisualisierungstechnikenGDV II