程序代做CS代考 Hive projection figures

projection figures

go-vxlab.csc.ncsu.edu / transformsdiscussion

http://go-vxlab.csc.ncsu.edu/transformsdiscussion

projections
CGClass @ NCSU

Intro CG @ NCSU
Ben Watson

cgclass.csc.ncsu.edu

http://cgclass.csc.ncsu.edu/

projections

go-vxlab.csc.ncsu.edu/
cgprojectionslides

http://go-vxlab.csc.ncsu.edu/cgprojectionslides
http://go-vxlab.csc.ncsu.edu/cgprojectionslides

history

https://proxying.lib.ncsu.edu/index.php?url=https://doi.org/10.1145/356744.356750

projection

ray casting

vertex projection

viewing / camera / eye coordinates (VC)

R
1

L
-1

E
(0,0,0)

Z = at

X =
at ✕ up

1

projection in viewing coordinates

R

L

E

1 0 0 0

0 1 0 0

0 0 1 0

0 0 1 0

x

y

z

1
Px

V

x

y

z

z

=

x/z

y/z

1

=

Px
NDC

= Px
H
= P V

VC

in perspective projection, the farther the smaller

E

Z

X

viewing

Superbug, 1977
top-down

Pole Position, 1982
moving view
fixed horizon

Virtua Racing, 1992
moving view

variable horizon

[ 0 0 1 ]

[ 0
1

0
]

[ 1
0 0

] (
0,0

,0 )

xx

xz

xy

oxyx

yz

yy oy

zx

zz

zy

oz

0 00 1

[ x x
x y

x z
]

[ z
x z

y z
z ]

[ y
x
y y

y z
]

[ 1 0 0 ]

[ 0
1

0
]

[ 0
0 1

]

( 0,0,0 )

( o
x , o

y , o
z )

viewing transform

x
x
y

x
z

x
-o

x

x
y
y

y
z

y
-o

y

x
z
y

z
z

z
-o

z

0 0 0 1

x

y

z

1

x’

y’

z’

1

=

V
VC
= V V

wc

[ 0 0 1 ]

[ 0
1

0
]

[ 1
0 0

] (
0,0

,0 )

math.hws.edu/graphicsbook/demos/c3/transform-equivalence-3d.html

http://math.hws.edu/graphicsbook/demos/c3/transform-equivalence-3d.html
http://math.hws.edu/graphicsbook/demos/c3/transform-equivalence-3d.html

total transform so far

x
x
y

x
z

x
-o

x

x
y
y

y
z

y
-o

y

x
z
y

z
z

z
-o

z

0 0 0 1

x

y

z

1

P V V
WC

WC
(world coords)

V

VC
(view coords)

1 0 0 0

0 1 0 0

0 0 1 0

0 0 1 0

x’

y’

z’

z’

=

x’/z’

y’/z’

1

=

Px
NDC

= Px
H
=

P

NDC
(norm device cds)

http://cs.brown.edu/courses/cs123/demos/camera/

http://cs.brown.edu/courses/cs123/demos/camera/
http://cs.brown.edu/courses/cs123/demos/camera/

https://web.archive.org/web/20180122053612/http://learningwebgl.com/l
essons/lesson10/index.html

https://web.archive.org/web/20180122053612/http://learningwebgl.com/lessons/lesson10/index.html
https://web.archive.org/web/20180122053612/http://learningwebgl.com/lessons/lesson10/index.html
https://web.archive.org/web/20180122053612/http://learningwebgl.com/lessons/lesson10/index.html

http://math.hws.edu/graphicsbook/demos/c4/walkthrough.html

http://math.hws.edu/graphicsbook/demos/c4/walkthrough.html
http://math.hws.edu/graphicsbook/demos/c4/walkthrough.html

29

BREAK
TIME


ask your
questions

listen to
tunes


https://youtu.be/1cmq0c9PjRI

viewport

viewport transform

w/2 0 o
x

0 h/2 o
y

0 0 1

x

y

1

x’

y’

1

=

V
DC
= VP V

NDC
w

h

2

2

( 0,0 )

( ox,oy )

total transform so far

x
x
y

x
z

x
-o

x

x
y
y

y
z

y
-o

y

x
z
y

z
z

z
-o

z

0 0 0 1

x

y

z

1

P V V
WC

1 0 0 0

0 1 0 0

0 0 1 0

0 0 1 0

x’/z’

y’/z’

1

=

Px
NDC

=

VP

DC
(device coords)

w/2 0 o
x

0 h/2 o
y

0 0 1

x’

y’

1

=

Px
DC
= VP

WC

V

VC

P

NDC

total transform so far

x
x
y

x
z

x
-o

x

x
y
y

y
z

y
-o

y

x
z
y

z
z

z
-o

z

0 0 0 1

x

y

z

1

1 0 0 0

0 1 0 0

0 0 1 0

0 0 1 0

x’/z’

y’/z’

1

=

Px
NDC

=

w/2 0 o
x

0 h/2 o
y

0 0 1

x’

y’

1

=

Px
DC
= VP

mat4.lookAt(…)mat4.perspective(…)
mat4.frustum(…)

gl.viewport(…)

P V V
WC

modeling

MC1
(model coords 1)

MC2

MC3

(0,0,0)

(0,0,0) (0,0,0)

WC = MC1 = MC2 = MC3 ?

(0,0,0)(0,0,0)(0,0,0)

WC = MC1 = MC2 = MC3 ?

(0,0,0)(0,0,0)(0,0,0)

MC1
(0,0,0)

(0,0,0)

(0,0,0)

MC2

MC3

M
2

M 1

M
3

(0,0,0)

WC

total transform

P V M
m
V

MCm
Px

NDC
=

VP

DC

Px
DC
= VP

WC

V

VC

P

NDC MCm

M
m

total transform

P V M
m
V

MCm
Px

NDC
=Px

DC
= VP

mat4.lookAt(…)mat4.perspective(…)
mat4.frustum(…)

gl.viewport(…) mat4.scale(…)
mat4.rotate(…)

mat4.translate(…)

parallel projection

perspectiveparallel

http://cs.brown.edu/courses/cs123/demos/camera/

http://cs.brown.edu/courses/cs123/demos/camera/
http://cs.brown.edu/courses/cs123/demos/camera/

http://lab.firejune.com/three/examples/canvas_camera_orthographic.htm
l

http://lab.firejune.com/three/examples/canvas_camera_orthographic.html
http://lab.firejune.com/three/examples/canvas_camera_orthographic.html
http://lab.firejune.com/three/examples/canvas_camera_orthographic.html

parallel projection in viewing coordinates

R

L

1 0 0 0

0 1 0 0

0 0 0 1

0 0 0 1

x

y

z

1

Px V

x

y

1

1

=

x

y

1

=

Px
NDC

= Px
H
= P V

VC

https://goo.gl/forms/pgVI38JK3V4MtqpP2

go deeper with readings…

https://sites.google.com/view/cgwiki-ncsu/topics/view-project

post reactions and… we might discuss them next time
log them and… get reading credit

https://sites.google.com/view/cgwiki-ncsu/topics/view-project
http://go-vxlab.csc.ncsu.edu/cgclassforumreadings
http://go-vxlab.csc.ncsu.edu/cgclassreadinglog

…and with videos

http://cgclass.csc.ncsu.edu/p/topic-notes.html#projections
(youtube)

http://cgclass.csc.ncsu.edu/p/topic-notes.html#projections

Requests, questions, thoughts?

go-vxlab.csc.ncsu.edu / projectiondiscussion

post them and… we’ll discuss them next time
log them and… get participation credit

http://go-vxlab.csc.ncsu.edu/projectiondiscussion