Download - IGC Figures - Dynamic Graphics Project

Transcript

Preface

ElementaryLinear

Algebra

Introduction toGeometricComputing

Data Structuresand Algorithms

ObjectOrientation

(C++)

ComputerGraphics

and

Visualization

ComputationalGeometry Robotics Computer

Vision

Computer-AidedDesign

GeographicInformation

Systems

Classical Geometry Computing

Geometric Computing

Chapter 1

P (x, y)

x

y

x

y

Point E2d P[5];

P[0]. . . P[4]

A

B

A

B

P2

x

y

P1

+?

P3

x

yP1

−→v1

P2

−→v2

−→v4

−→v3

Tuple E2d

x,y: double

Point E2d Vector E2d

flawed design

−→v1−→v2−→d1

−→d2

P

Q

R

O

P

Q

R

O

−c/a

−c/b

−→v1

−→v2

−→v2 −−→v1

(0, 0)(1, 0)

(2, 0)(0, 1)

(1, 1)(2, 1)

−→v1

−→v2

−→v1−→v2

−→v1

−→v2

−→v1−→v2 −→v1

−→v2−→v1

−→v2

−→v1

−→v2

−→v1

−→v2

|M | = 1 |M | = 1|M | = 1|M | = 1|M | = 1|M | = −1|M | = −1|M | = −1

Chapter 2

−ve

+ve +ve

−ve

0 0

left halfspace

right halfspace

+−

−→v = −→v1 ×−→v2

x

y

z

x

y

z

x

y

z

x

y

z

x

y

z

x

y

z

−→v−→v1

−→v2

−→v−→v1

−→v2

−→v

−→v1

−→v2−→v

−→v1

−→v2−→v−→v1

−→v2

−→v

−→v1−→v2

P1 P1

P2 P2

P3P3

left turn colinear right turnP1

P2

P3

x

y

z−→v3

−→v1

−→v2

p1p2

p3

q

insidecircle

oncircle

boundary

outsidecircle

p1p2

p3

qp1

p2

p3

q

L

X+

Y+

Y−

X−

P1P2 P3

P+1P−1

Chapter 3

Point E2d

x,y: double

Point E3d

z: double

Point E2d

#x,y: double

Point E3d

z: double

xy

z

px2 + y2

px2 + y2 + z2

P1

P3

P4

P2

P1

P3

P4

P2

−→N

−−−→P1P2

−−−→P2P3

−−−→P1P4

Chapter 4

θ

φ

P ′(x′, y′)

P (x, y)

x

y

−→v

T −→v′ = T (−→v ) = −→v

T

PT P ′ = T (P )

x

y

ymin

ymax

y′min

y′max

xm

in

xm

ax

x′ m

in

x′ m

ax

E

−→d

x

y

z

−→v ?

E

−→d

x

y

z

−→v−→u−→s

x

y

z

x

y

z

x

y

z

x

y

z

xz-dimetric yz-dimetric xy-dimetricisometric

x

y

z

x

y

z

x

y

z

x

y

z

x

y

z

RyRx 6= RxRy

E1

A B

A′ B′

A

B

C

A′ B′

C′

M =?E2

Chapter 5

nointersection

singlepoint

segment

O

P1

P2

splittingline

clippingregion

EN

WS

ENWS

L L LL

E

N

W

S

LLLL

LRLL

LLLR

RLLL

RRLLLRRL

LLRL

LLRR RLLR

East-HalfspaceClipping

North-HalfspaceClipping

West-HalfspaceClipping

South-HalfspaceClipping

InputPolygon

OutputPolygon

Chapter 6

Point E2

�B

ind�

doub

le

Point E2 double Point E2 float

NT

x,y: NT

�B

ind�

float

3 42

P1

P2 P3

P4

A

B

C

D

E

GH

F

Chapter 7

A

B

PQ

R

(−5,−5), (0, 0) (−5,−5), (−2,−2) (−6,−6), (−5,−5) (−3,−3), (−2,−2)

0−ε ε︸︷︷︸treat as 0

> 0< 0

Chapter 8

P−→d

P

Q

R

S

T

P+

P−

antipode of P

P ′

AB

C

A ≤ B

B ≤ CC ≤ A

P

Ssource

Starget

s2s1

s2s1s2

s1

s2

s1

Chapter 9

E 2 S 2

P2 T 2

O

−→d

−−→d

−→N

O

−→Y

−→X

−→Z

O

−→c

−→B1

−→B2

O

P

Q

−→N

−→N

O

P

Q

−→M

O

P

Q

(P, Q,−→M ) (P, Q,

−→N )

P1

P2

P3

−→c1

−→c2

−→c1 ∩ −→c2

−→c2 ∩ −→c1

Chapter 10

Chapter 11

l

m

E

A

A′

B

B′

C

C′

AB C

B′ = f(B)

A′ = f(A) C ′ = f(C)m∞

E

l

f(l∞)f−1(m∞)m∞

l∞m

l∞

A

B

C

A′

B′

C′B′′

C′′

AB

C

A′ = B′ = C′

B︸︷︷︸ ︸︷︷︸CA

lm

A

B

C

A′

B′

C ′

E

l

m

A B C

A′B′

C′

E

A

B

A′

B′

image plane Eye

object plane

l∞

P (l∞)

l

l′ = P (l)

l∞

l1l2

horizon line

ideal pointsP (S∞1 )

S∞1

S1

S2 S3

horizon lineide

alpo

int

l

m lm l

m

A

B

C

C

B

A

AB

C

A′

B′

C′

1-point

y

x

z

2-point

3-point

(b)(a)

AA′

BB′

C

C ′

O

A

A′

C ′

BC

B′

Chapter 12

x

w

idea

lpoi

nt

P1

x

w

canonical representatives

x

w

x

w

A

BR

x

yww

=1

x

yw

24 x1

y1

w1

3524 x2

y2

w2

35

w

l

x

y

w=

1 −→N

w

x

yw

=1

x

yw

A

Bl

−→A

−→B

l−→B

l−→A

x

y

(0, y, 0)

(x, 0, 0)(0, 0, w)

w = 0

x y z w

0 xy xz xw

−xy 00

0−xz

−xw

−yz

x

y

z

w

yz yw

zw

−yw −zw

x

y

z (x, 0, 0, 0)

(0, y, 0, 0)

(0, 0, z, 0)

(0, 0, 0, w)

w = 0

(wx, w/k)

(wx, w)(x, 1)(kwx, w)

(kx, 1)

(wx, w)(x, 1)(wx + wt, w)

(x + t, 1)

(x, w)

(x, px + w)

slope = p

slope = −p

E3 P 3 P 3 P 3 P 3 E3 E2M V P D+1 \z

x

y

z

(x, y, z)

(x′, y′,−N)−

N

x

y

z

2664−1−111

37752664

11−11

3775

LB−N1

R

T−N1

x

y

z −N−F

x

z

x

z

x

z

x

z

x

z

x

z

y

x

z

A

B

A′

B′

B′′

E3 P 3 P 3 P 3 P 3 E3 E2M V P D+1 \z

E3 P 3 P 3 P 3 P 3 E3 E2M V P D clip \zE3+1

E3 P 3 P 3 E3 E2M P D \z+1E3 E3Vclip

E3

E3 P 3 P 3 E3 E2M V P Dclip \zE3 +1

E3 E3

AB C

A′

B′ C′

O

Chapter 13

AB

a

b

ABab

AB

ab

AB P

ba

a + b

︸︷︷︸︸︷︷︸a b:

A

B

P (a, b)

b

a

A′

B′

AB ab

Q

A

B

C

P

c

a

b

l

A

B

C

P

c

a

b

A

B

C

P

Q

A

B C

A

B

C

Chapter 14

D

A

C

C′

D′

E

E

C′

E′

A′

B

view

input

A

C

A′

C′

D

E

C′

E′

D′

A

C

A′

C′

D

E

E

C′

E′

D′

x

w

AB

C

D

EF

+∞

+∞

x

w

x

w

lim

w→

0+(−

1,w

)

lim

w→

0−

(−1,w

)lim

w→

0+(1

,w)

lim

w→

0−

(1,w

)

x

y

w

x

y

w

+ve+ve

N

Chapter 15

x

y

z

A

B

B′

C

x

z

A′ C′

w

x

(a)

P2P1

(b) (d)(c)

w

x

w

x

w

x

w

x

(a) (b) (d)

w

x

w

x

w

x

(c)

(a) (b) (d)(c)

m

n

l

m

l

n

l

m

n

l

w

x

P0

P1

w

x

P0

P1

w

x

P0

P1

P0P1

P0P1

P0P1

E3 T 3 E3 E2V P D \z+1T 3 T 3M

T 3

E3 T 3 E3 E2V P Dclip \z+1T 3T 3 T 3M

T 3

E3 T 3 E3 E2V P Dclip \z+1T 3T 3 T 3M

T 3

E3 T 3 E3 E2V P Dclip \z+1T 3 T 3 T 3M

T 3

x

z

x

z

x

z

x

z

x

z

x

z

S 2 P2 T 2S 2 E 2 S 2

Chapter 16

Chapter 17

Geometry Module 1 Geometry Module 2

Test 1 Test 2

Client code (actual system)Input Module Output Module

Chapter 18

Chapter 19

Chapter 20

1

32

2?

1 + 1 = 2 =⇒ outside?

A

BC

D

E

F

≤<

ignored

Chapter 21

−→E

−→N −→

−→E

−→N

ψ

−→H −→

L

−→N

−→L

−→N

−→N

ambient+

diffuse (per light)

−→L

−→L

specular (per light) a + d + s

scanline

A

BC

D

pixels

A

BC

D

Chapter 22

kernel

d 1

d 2

35

2

4

1

4

41

L

L

3 2 5

3 2

L 2

3

35

2

4

1

4

41

32 5

2

1

5

E3 T 3 E3 E2V P Dclip \z+1T 3 T 3 T 3M

T 3

E3 T 3 E3 E2(N)V P Dclip Vis+1T 3 T 3 T 3M

T 3

E3 T 3 E3 E2(N)V P Dclip Vis+1T 3 T 3 T 3M

T 3 ShadeT 3

Chapter 23

d1

d2

d3

−→u

−→v −−→n

−→E

−→N

−→R

θ θ

−→E

−→N

−→R

θ

ξ

Chapter 24

Nk −Rk

< 0

R

> 0

LL

LR RR

RL

N

Chapter 25

Chapter 26

z

y

x

000

100

001 011

010

111

110

101

V V EV FV

V E EE FE

EF FFV F

x

y

z

x

y

z

x

y

z

1

1

t

V

E

F

1

0 1

211

000

21

3 3

23

Tetrahedron Cube Octahedron Icosahedron Dodecahedron

Tetrahedron CubeOctahedron IcosahedronDodecahedron

{4, 4} {3, 6} {6, 3}

. . .

Chapter 27

outgoing edge

sourcetarget

succpred

twin

faceedge F

F

EV

V E EE FE

EF

TF

TF

TF

TFTF

T

F

T

FTF

lexicographicorder

std::pairorder

Ffir

st

second second

first

T

kvfs()

mvfs() v1 S

f

kef(e1)

mef(e2,e3)mev(e1)

kev(e4)v1

v2

e1

e3

e2

v3

e4

v1

v2

e1

e3

e2

v1

v2

e3

e2

mev mev mev mef

mvfs

mev

mevmevmevmef

mef

mef mef

mev

3 × mev mef kemr

4 × mefkfmrh

4 × mev

Chapter 28

−3 0 2 5

−3

0

25

a

c

b

a

b

c

−3 0 2 5

−3

0

25

A− +

− + − +

− +

− +

− +

A B A B

B

A

B

C

D

DC

A

B

B

A

A B

− + − +

− +− +

− +

− +

− +

− +

B

B

C

D

DC

C

C D

C D

L R S

L RS

L RS

L

R

L R

1:

2:

splitno splitting

L R

S

L R

S

1s:

2s:

L R

boundary/splitter coincidence

AB B

A

− +

− +

B+

B−A+

B−A−

B−A+B−A−

B+

P

P+ = φP− = S

+P −

+P

split

+P −

+P

P+ = SP− = φ

+P −

+P −

+P −

+

split

st s

ts

t s t s t s

tstst

case b case c1 case c2 case c3 case d case a1case a3case a2

ABB

A

B

A C

− +

− +

− +

− + − +

l

m

n l

AB

C

l

m

n

mn

p

p

p

lp nm

AB ∪BC

B

C

C

B

− +

− +

l

m

n m

AB

C

l

m

n

np

p

l

pC

B

− +

− +

m

np

l

BC ∪AB

A

B B− +

E2

+ +

+

E3

+ +

+

+

+−

+−

+

+

+

−+

M

N

M

N

L+−

+−

+−

L

+

(a)

(b)

(c)

(d)

(e)

1

+

−+

+

−+

+

−+

+

−+

+

−+

(f)

(g)

(h)

(i)

(j)

I

I

+

−+

+

−+

+

−+

+

−+

+

−+

BC

AB

CA

EF

F D

BC

AB

CA

A

B C

D

F

E

A

BC

Chapter 29

G: GeometryCA: Combinatorial Algorithm

E1 CA S1 CA E2 CA S2 CA

�B

ind�

E1

�B

ind�

S1

�B

ind�

E2

�B

ind�

S2

CA G

B C

D

EF

A

CA

BC

+

+

+

−−

EF

FD

DE

+

+

+

−−

AB

D

F

B C

A CA

BC

+

+

+

−−

EF

FD

DE

+

+

+

−−

AB

B C

D

EF

ACA

BC

+

+

+

−−

EF

DE

+

+

−−

AB

BE

DA

C

F

CA

BC

+

+

+

−−

EF

DE

+

+

−−

AB

source

target

A

B

A

B

Algorithm

Geo

met

ry

1 2 3 4 5ABCD

?

?

?

?

?

Chapter 30

Node

Primitive node Transformation node Boolean operation node

Cylinder ConeCube

Leaf node Interior node

2

1

PrimitiveNode Transformation node Boolean operation node

Cylinder ConeCube

Node2

1

Component

Leaf1 Leaf2 Composite

Cube

T

Cube

T

empty(outside)

partial(boundary)

full(inside)

edge vertex

Chapter 31

h

hc

ggc

d(gc) < d(hc)

E

E′

Chapter 32

P

Q−→N

O

A

B a

b P

Appendix A

letter

210 mm8.5”

A4

297m

m11”

Line Join 0 Line Join 1 Line Join 2

Lin

eC

ap0

Lin

eC

ap1

Lin

eC

ap2

Cogito ergo sum

Cogito ergo sum

Appendix B

colorbuffer

rasterdisplaydevice red

bluegreen

redblue

greenred

green

blue

alpha

GL LINES GL LINE STRIP GL LINE LOOP

GL TRIANGLES GL TRIANGLE STRIP GL TRIANGLE FAN

GL QUAD STRIPGL QUADS GL POLYGON

GL POINTS

frontbuffer

backbuffer

displaydevice

glutSwapBuffers()

colorbuffer

VertexTransformation Rasterization

glBegin(..);...glEnd();

glP

ush

Matr

ix()

R1∼ =

glR

ota

ted(a

ngle

1,0,1

,0)

glP

ush

Matr

ix()

glP

ush

Matr

ix()

S1∼ =

glS

cale

d(5

,0.5

,0.5

)

T1∼ =

glT

ranslate

d(0

.5,0

,0)

glu

tSolid

Cube(

1.0

)

glP

opM

atr

ix()

T2∼ =

glT

ranslate

d(5

,0,0

)

M

MR1

MR1

MR1

M M

M

M

MR1

M

MR1

MR1

M

MR1

MR1

MR1S1

M

MR1

MR1

MR1S1T1

M

MR1

MR1

M

MR1

MR1T2

Appendix C

GlowComponent

GlowSubwindow

GlowWindow

HelloSegmentWindow

GlowWindow

HelloSegmentWindow

GlowCheckBoxReceiver

GlowPushButtonReceiver

GlowIdleReceiver

Scene

GlowComponentGlowWindow

GlowViewManipulator

Class diagram Object diagram

myArcballWindow

myManipulator

mySceneArcballWindow