Hill 02
Hill 02
(100, 50)
(150, 80)
(0, 290)
void main()
{
initializ e things 5
create a screen windo w
glutDisplayFunc(myDisplay); // register the redraw function
glutReshapeFunc(myReshape); // register the reshape function
glutMouseFunc(myMouse); // register the mouse action function
glutKeyboardFunc(myKeyboard); // register the keyboard action function
perhaps initializ e other things
glutMainLoop(); // enter the unending main loop
}
all of the callbac k functions are defined here
my first attempt
479
x
639
my first attempt
glVertex2i(…) commands.
ui 32-bit unsigned number unsigned int or unsigned long GLuint, GLenum, GLbitfield
T0
T0
P1
P2
P3
T2
T2 T1
T1
40
40 100 x
Golden Rectangle
e
d
1 8.5/11 f
square portrait
1/f
y +
D
C F
GL_QUADS GL_QUAD_STRIP
height
a a
a is a number
Pk − 1 Pk
f (.)
Pk = (x k , y k ) is a point
S G I K
J N Y
C D M W X E
A O Q V
F P T R U
L
Z
B H
K
I B Y
G E
S
M W X
D J
C Q
O V
R
A F
P
T U