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
Dome Projection – Becoming more Common
2
mputer Graphics
Co
I believe that it’s only a matter of time until it becomes a routine visualization tool
mjb – December 15, 2020
1
Computer Graphics
Dome Projection using a Vertex Shader
Mike Bailey mjb@cs.oregonstate.edu
dome.pptx
12
34
mjb – December 15, 2020
Programming a Dome display is easier when only a single projector is used
3
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
Computer Graphics
mjb – December 15, 2020
Dome Distortion
Move the teapot so it surrounds the audience
4
Computer Graphics
mjb – December 15, 2020
Dome Projection:
Viewing Volume = (-1,-1) to (1,1)
5
The edge of the circle represents the edge of the dome projection = your left, right, bottom, top as you are sitting in the theater.
Computer Graphics
mjb – December 15, 2020
God’s-eye View:
pos.y Θ
pos.z
Dome Vertex Shader:
As the eye sees it: From the side: YY
6
pos.y lenxy = sqrt(x2 + y2)
Z
Φ
pos.x X Θ XZ Φ
float lenxy = length( pos.xy );
Note: ( pos.xy / lenxy ) = ( cosΘ,sinΘ )
pos.x eye position
pos.z
const float PI = 3.14159265;
void main( ) {
}
vec4 pos = gl_ModelViewMatrix * gl_Vertex;
float phi = atan( lenxy , -pos.z ); pos.xy=(phi/(PI/2.)) * (pos.xy/lenxy);
gl_Position = gl_ProjectionMatrix * pos;
Computer Graphics
mjb – December 15, 2020
56
1

Dome Vertex Shader:
Cartesian:
7
Dome:
Computer Graphics
mjb – December 15, 2020
Dome Vertex Shader:
Dome:
8
Computer Graphics
mjb – December 15, 2020
78
Mars Panoram in the Dome
10
Computer Graphics
mjb – December 15, 2020
Flow Visualization in the Dome
9
Computer Graphics
9 10
11
mjb – December 15, 2020
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.
Computer Graphics
mjb – December 15, 2020
2