Homework* Creating an moving 2D airplane using OpenGL - C++ please help URGENT !

Using OpenGL environment you are asked to create an airplane and move it around the screen.

Step 1: Define the shape of a 2D aircraft. You can draw a simple aircraft model as any sort of polygon.

Step 2: Make sure you can draw the airplane by calling a drawing function
Void draw_airplane(int xpos, int ypos, angle, warpfactor)                  
This function will draw the airplane at a position P= (xpos, ypos). The angle and warfpfactor will be explained in Step3 and Step 5 respectively. Make sure that the airplane does not crash when the airplane is close the screen border.

 Step 3: The rotation angle is defined by the angle . The rotation angle initially starts with a value of 0, which should make the direction of the airplane to the right of the screen. Use left and right arrow keys on the keyboard to rotate the airplane into left and right directions respectively.

Step 4: Each time the main loop of the program is executed, the airplane will have a position P and a velocity V.  Velocity of an object is defined by its speed and direction. Each time through the loop, the new position is obtained by adding the velocity vector to the position vector to get a new position for the airplane.
When the airplane gets near the edge of the screen it is moved to the opposite edge of the screen so that it goes off one edge onto another.

Step 5 (Optional, 20 points bonus). Choose a new key to control the velocity. When the key is hit, add a unit vector to the current velocity vector (in the same direction) that is
 
Assume that the airplane has a flexible hull, and when then thrusters is turned on, the airplane compresses in the direction with the angle . Make a variable C that defines the degree of compression of the airplane and make C larger when thrusting is used. Let C slowly return to its default value (no compression) when thrusting is not being used. In the draw airplane function, C should be passed in as the warp factor, and it should cause a scaling of the ship in the direction it is facing when the thrust is applied.
LVL 1
CahitEyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CahitEyAuthor Commented:
Is anybody writing a code for me?
0
ZoppoCommented:
Hi CahitEy,

no, sorry, no one will write the code for you.

It is agains EE rules to do your homework for you. You can always ask about specific problems when trying to solve it.  Asking for a
solution however is out of question.

http://www.experts-exchange.com/help.jsp?hi=21

You should ask EE to delete this question (via the link 'Request Attention' above), then try to solve your problem yourself and ask specific question if you get stuck with any particular problem.

ZOPPO
0
George TokasCommented:
Instructions:
1. Find a good set of wrapper classes for OpenGL. I can't help you here because I'm using DirectX
2. The wrapper set will have ( my set for DirectX has) a class for an object (3D or 2D) instance. Create the instance of the object...
3. Using the functions (in example SetPosition()) you can move the instance according to the input you are getting...

The comment from zoppo is right.
Make a search here for OpenGL wrappers...

George Tokas.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ahmets35Commented:
Using OpenGL environment you are asked to create an airplane and move it around the
screen.
Step 1: Define the shape of a 2D aircraft. You can draw a simple aircraft model as any sort
of polygon.
Step 2: Make sure you can draw the airplane by calling a drawing function
Void draw_airplane(int xpos, int ypos, angle, warpfactor)
This function will draw the airplane at a position P= (xpos, ypos). The angle and warpfactor
will be explained in Step3 and Step 5 respectively. Make sure that the airplane does not crash
when the airplane is close the screen border.
Step 3: The rotation angle is defined by the angle¿ . The rotation angle initially starts
with a value of 0, which should make the direction of the airplane to the right of the screen.
Use left and right arrow keys on the keyboard to rotate the airplane into left and right
directions respectively.
Step 4: Each time the main loop of the program is executed, the airplane will have a
position P and a velocity V. Velocity of an object is defined by its speed and direction. Each
time through the loop, the new position is obtained by adding the velocity vector to the
position vector to get a new position for the airplane.
When the airplane gets near the edge of the screen it is moved to the opposite edge of the
screen so that it goes off one edge onto another.
Step 5 (Optional, 20 points bonus). Choose a new key to control the velocity. When the
key is hit, add a unit vector to the current velocity vector (in the same direction) that is
Vnew ¿V ¿ (Cos¿, sin¿)
Assume that the airplane has a flexible hull, and when the thrusters is turned on, the
airplane compresses in the direction with the angle¿ . Make a variable C that defines the
degree of compression of the airplane and make C larger when thrusting is used. Let C slowly
return to its default value (no compression) when thrusting is not being used. In the draw
airplane function, C should be passed in as the warp factor, and it should cause a scaling
of the ship in the direction it is facing when the thrust is applied.
0
gf hgCommented:
not nice
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.