Question: Hello I have a OpenGL animation question could you help me? Initially, draw a 2-dimensional pirate face centered at the origin and lying on the
Hello I have a OpenGL animation question could you help me? Initially, draw a 2-dimensional pirate face centered at the origin and lying on the x-y plane as shown in the gure below, part(a). Store the vertices of this pirate in an array called pirateface. You are free to set the radius of the circle forming the face. When the key 'a' i pressed, produce a sequence of drawings of the face rolling along the x-axis, but scaled down to a radius of 1/2 of its original radius. (See gure below, part(b)). This animation will look like as if the face is rolling.
You can do this by drawing the pirate
times, for
When
, the pirate will be displayed upright at some initial position, say at
. As i increases, the face rotates and translates to its next position. When
, it will undergo a full 360 degree rotation clockwise.You must do this part by transforming the vertices that you stored in your original pirateface array.
i=0 i=1 i=2 i=3 i=4 example when n=4 (b) i= 0,1,2,..., n. x= 10 i=0 i=1 i=2 i=3 i=4 example when n=4 (b) i= 0,1,2,..., n. x= 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
