This is to be done in Visual Studios OpenGL C++. I have attached the source code that needs to be used as a starting

This is to be done in Visual Studios OpenGL C++. I have attached the source code that needs to be used as a starting point.

Specifically, you must address the following rubric criteria:

  • Arrange the bricks into an organizational structure that promotes engagement with the animation.  The goal is to create a layout that is visually unique or compelling  and includes bricks of a style that makes the animation more interesting  to watch. Some options for details you may wish to include are as  follows, but you do not need to complete all of these. You can also try  an idea of your own instead.
    • Add texture or color to the different kinds of bricks.
    • Change the sizes of the bricks.
    • Add a manually controlled paddle to the bottom of the screen, using the brick item as a base.
  • Apply physics laws to the circles.  When a circle hits one of the sides of the screen, its progress should  be altered in some way. While the circles currently move at a constant  speed and have randomized movement once they bounce off one edge of the  screen, there are ways you can alter this to make the animation more  engaging. Some options you may wish to use for your work are as follows,  but you do not need to complete all of these. You can also try an idea  of your own instead.
    • Alter the speed of the circle.
    • Change  the angle of trajectory so it follows physics laws instead of taking a  randomized pattern. (This means it would continue in the direction it  was heading rather than moving backward.)
    • Add friction to specific surfaces, which would affect the circle and slow its progress once it collided with the surface.
  • Alter the state of the bricks upon collision.  When a circle collides with a brick, you will need to code for an event  to occur. This means updating the code to alter the state of the bricks  upon collision. Some options you may wish to use for your work are as  follows, but you do not need to complete all of these. You can also try  an idea of your own instead.
    • Require the brick to take a certain number of hits before it disappears.
    • Change the color or texture of the brick when it is hit.
    • Combine  both of the previous two options, meaning the brick changes its texture  each time it is hit until it disappears. For example, you may choose to  add cracks to the texture of the brick until it is “destroyed.”
  • Alter the state of the circles upon collision.  When a circle collides with another circle, you will need to code for  an event to occur. This means updating the code to alter the state of  the circles upon collision. Some options you may wish to use for your  work are as follows, but you do not need to complete all of these. You  can also try an idea of your own instead.
    • The two circles combine to become one larger circle.
    • The circles change their color or texture.
    • Both circles disappear once hit.
    • The circles spawn multiple smaller circles.
  • Explain the changes you made to the code.  Discuss the work you completed by focusing on the different tactics you  used to create a fully realized 2D animation. What were the changes you  chose to make? What was your intent behind them? How did you approach  coding to successfully create this outcome?#include <GLFWglfw3.h> #include "linmath.h" #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <iostream> #include <vector> #include <windows.h> #include <time.h>  using namespace std;  const float DEG2RAD = 3.14159 / 180;  void processInput(GLFWwindow *window);  enum BRICKTYPE { REFLECTIVE, DESTRUCTABLE }; enum ONOFF {ON,OFF};  class Brick { public: float red, green, blue; float x, y, width; BRICKTYPE brick_type; ONOFF onoff;   Brick(BRICKTYPE bt, float xx, float yy, float ww, float rr, float gg, float bb) { brick_type = bt; x = xx; y = yy, width = ww; red = rr, green = gg, blue = bb; onoff = ON; };   void drawBrick() { if (onoff == ON) { double halfside = width / 2;   glColor3d(red, green, blue); glBegin(GL_POLYGON);   glVertex2d(x + halfside, y + halfside); glVertex2d(x + halfside, y – halfside); glVertex2d(x – halfside, y – halfside); glVertex2d(x – halfside, y + halfside);   glEnd(); } } }; class Circle { public: float red, green, blue; float radius; float x; float y; float speed = 0.03; int direction; // 1=up 2=right 3=down 4=left 5 = up right   6 = up left  7 = down right  8= down left   Circle(double xx, double yy, double rr, int dir, float rad, float r, float g, float b) { x = xx; y = yy; radius = rr; red = r; green = g; blue = b; radius = rad; direction = dir; }   void CheckCollision(Brick* brk) { if (brk->brick_type == REFLECTIVE) { if ((x > brk->x – brk->width && x <= brk->x + brk->width) && (y > brk->y – brk->width && y <= brk->y + brk->width)) { direction = GetRandomDirection(); x = x + 0.03; y = y + 0.04; } } else if (brk->brick_type == DESTRUCTABLE) { if ((x > brk->x – brk->width && x <= brk->x + brk->width) && (y > brk->y – brk->width && y <= brk->y + brk->width)) { brk->onoff = OFF; } } }   int GetRandomDirection() { return (rand() % 8) + 1; }   void MoveOneStep() { if (direction == 1 || direction == 5 || direction == 6)  // up { if (y > -1 + radius) { y -= speed; } else { direction = GetRandomDirection(); } }   if (direction == 2 || direction == 5 || direction == 7)  // right { if (x < 1 – radius) { x += speed; } else { direction = GetRandomDirection(); } }   if (direction == 3 || direction == 7 || direction == 8)  // down { if (y < 1 – radius) { y += speed; } else { direction = GetRandomDirection(); } }   if (direction == 4 || direction == 6 || direction == 8)  // left { if (x > -1 + radius) { x -= speed; } else { direction = GetRandomDirection(); } } }   void DrawCircle() { glColor3f(red, green, blue); glBegin(GL_POLYGON); for (int i = 0; i < 360; i++) { float degInRad = i * DEG2RAD; glVertex2f((cos(degInRad)*radius) + x, (sin(degInRad)*radius) + y); } glEnd(); } }; vector<Circle> world; int main(void) { srand(time(NULL));   if (!glfwInit()) { exit(EXIT_FAILURE); } glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); GLFWwindow* window = glfwCreateWindow(480, 480, "Random World of Circles", NULL, NULL); if (!window) { glfwTerminate(); exit(EXIT_FAILURE); } glfwMakeContextCurrent(window); glfwSwapInterval(1);   Brick brick(REFLECTIVE, 0.5, -0.33, 0.2, 1, 1, 0); Brick brick2(DESTRUCTABLE, -0.5, 0.33, 0.2, 0, 1, 0); Brick brick3(DESTRUCTABLE, -0.5, -0.33, 0.2, 0, 1, 1); Brick brick4(REFLECTIVE, 0, 0, 0.2, 1, 0.5, 0.5);   while (!glfwWindowShouldClose(window)) { //Setup View float ratio; int width, height; glfwGetFramebufferSize(window, &width, &height); ratio = width / (float)height; glViewport(0, 0, width, height); glClear(GL_COLOR_BUFFER_BIT);   processInput(window);   //Movement for (int i = 0; i < world.size(); i++) { world[i].CheckCollision(&brick); world[i].CheckCollision(&brick2); world[i].CheckCollision(&brick3); world[i].CheckCollision(&brick4); world[i].MoveOneStep(); world[i].DrawCircle(); }   brick.drawBrick(); brick2.drawBrick(); brick3.drawBrick(); brick4.drawBrick();   glfwSwapBuffers(window); glfwPollEvents(); }   glfwDestroyWindow(window); glfwTerminate; exit(EXIT_SUCCESS); } void processInput(GLFWwindow *window) { if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) glfwSetWindowShouldClose(window, true);   if (glfwGetKey(window, GLFW_KEY_SPACE) == GLFW_PRESS) { double r, g, b; r = rand() / 10000; g = rand() / 10000; b = rand() / 10000; Circle B(0,0,02,2, 0.05, r, g, b); world.push_back(B); } }

Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Ace Writing Center has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

Essays

Essay Writing Services

At Ace Writing Center, Nowadays, students normally have extremely busy schedules. You will note that some of them have to take on some evening or weekend jobs in order to get some income that can help them to sustain in college or in the university. This can deny them a chance to write all the essays given. Others usually get bombarded with a lot of work by their lecturers. This can still delay such students from working on all their essays. However, some of them usually try to work on all these essays but end up delivering their work late. This can prevent them from graduating since most lecturers are strict on deadlines. If you want to write a business essay, the wise way is to hire an outstanding essay writing service like us, so that you can get the best results. If you are keen, you will note that many companies usually overcharge their customers. Some of them are there only to make money. And in reality, they really don’t care to build a long term commitment with students. You should not choose such companies. You should take your time and choose a reliable company to work with. Ace Writing Center is the ultimate solution for you. We have been offering our writing service for more than 7 years. This is a clear indication that you will get quality essay writing service. We have a wide range of writers who can work on any business essay that you might have. We believe in doing extensive research so that we can provide quality work to all our clients. .

Admissions

Admission and Business Papers

Have you ever had to write an admission essay for college? The majority of students face the same issues when applying to a university or college and many in such situations decide they need professional help to cope with this matter. They get in a situation when the deadline keeps coming closer but lack motivation to start because they are just not sure if their writing skills are strong enough. We have a solution for you! Ace Writing Center is the best admission essay writing service with a large professional team and years of experience in providing high-quality papers to students of all levels and faculties. The mission of our team is to help students make their dreams of entering a good college come true and that’s what we offer!.

Editing

Editing and Proofreading

Sometimes all the words for your paper just flow out of your mind and into your fingers. You type quickly at your keyboard and there they are, your beautiful words right there on the screen. But you have no idea how to polish it up. You may be wishing there was a paper writing service that offered this type of writing service. Look no more! Here at Ace Writing Center, we offer you an editing and proofreading option that you can't find anywhere else..

Coursework

College Essay Writing

In case you are familiar Ace Writing Center, you know the way to distinguish a better company from a cheap one exactly. First of all, poor service website does not have a sufficient support. We think support team is an essential part of success; it has to answer all clients’ questions and be a connecting link between clients and their writers. On our web-service you will get answers about anything you need and your writer will receive all your instructions, assignments and requirements exactly and swiftly. A writing service that we run has got a flexible pricing system that will save you from senseless wastes and many bonus systems that let you sparing money for something important for you.