CS计算机代考程序代写 This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
Mike Bailey mjb@cs.oregonstate.edu
Computer Graphics
dome.pptx
mjb – December 15, 2020
Computer Graphics
mjb – December 15, 2020
Computer Graphics
mjb – December 15, 2020
Computer Graphics
mjb – December 15, 2020
Dome Projection using a Vertex Shader
12
Programming a Dome display is easier when only a single projector is used
3
Dome Distortion
4
A fisheye lens distorts the image so that it spreads out across the dome. The trick is pre-distorting the image in the other direction so that it looks correct after being projected
34
1
Dome Projection – Becoming more Common 2
I believe that it’s only a matter of time until it becomes a routine visualization tool
Move the teapot so it surrounds the audience
1

Viewing Volume = (-1,-1) to (1,1)
const float PI = 3.14159265;
Dome Projection:
5
Dome Vertex Shader:
6
The edge of the circle represents the edge of the dome projection = your left, right, bottom, top as you are sitting in the theater.
float phi = atan( lenxy , -pos.z );
pos.xy = ( phi / (PI/2. ) ) * ( pos.xy / lenxy );
Computer Graphics
mjb – December 15, 2020
Computer Graphics
mjb – December 15, 2020
56
Computer Graphics
mjb – December 15, 2020
Computer Graphics
mjb – December 15, 2020
Cartesian:
Dome:
Dome:
Dome Vertex Shader:
7
Dome Vertex Shader:
8
78
Z
pos.x
}
God’s-eye View:
As the eye sees it: From the side: YY
void main( ) {
pos.z Θ Φ
X
pos.y
Θ XZ Φ
lenxy = sqrt(x2 + y2)
pos.y
vec4 pos = gl_ModelViewMatrix * gl_Vertex;
float lenxy = length( pos.xy );
Note: ( pos.xy / lenxy ) = ( cosΘ,sinΘ )
gl_Position = gl_ProjectionMatrix * pos;
pos.x eye position
pos.z
2

Computer Graphics
mjb – December 15, 2020
Computer Graphics
mjb – December 15, 2020
Computer Graphics
mjb – December 15, 2020
11
Flow Visualization in the Dome 9
Mars Panoram in the Dome
10
9 10
Large Lines and Polygons Need to be Tessellated
11
Note: This edge does not pass through the flow vectors!
Note: This edge does pass through the flow vectors!
Bounding Box edges were not tessellated. Straight lines on the monitor produced curved lines on the dome.
Bounding Box edges were tessellated. Curves lines on the monitor produced straight lines on the dome.
3