Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using Visual C++ and your OpenGL configured environment, write an application th

ID: 3938118 • Letter: U

Question

Using Visual C++ and your OpenGL configured environment, write an application that calculates and plots the 2D parabolic trajectories for an object whose starting position is p1 = (500,400) with velocities, v = (30m/s,40 m/s),for at least 4 different planets including Earth. Plot the trajectories using different line colors and styles for values of time increments of 1 second. Plot the trajectories only up to the first negative Y value. For example, the last 3 plotted points (x,y) might be

860 174.4

890 91.9

920   -0.4

No additional points beyond the first negative value should be plotted.

Label the trajectories corresponding to the planets selected. Be sure to reference your source used for the gravity for the planets. Be sure your plot is well-organized, includes grid lines, x and y axis, x-axis and y-axis labels, and legends. Each trajectory should use a different symbol or shape or color. One possible graphic result is shown below.

700 600 500 400 300 200 Earth Mercury Venus 200 100 0 -100 -200 X Jupiter 500 1000 1500

Explanation / Answer

using visual c++ and openGl the application will be as follows /* Shape */ void polygon (wcPt2D *verts) { GLint k; glBegin (GL_QUADS); for (k = 0; k < 4; k++) glVertex2f(verts [k].x, verts [k].y); glEnd(); } /* Initial position */ GLint nVerts = 4; wcPt2D verts [4] = { {25.0, 75.0}, {75.0, 75.0}, {25.0, 25.0}, {75.0, 25.0} }; /* Centroid */ GLint k, xSum = 50, ySum = 50; for (k =0; k
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote