Difference between revisions of "Homework1W15"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
(The Project (100 Points))
 
Line 19: Line 19:
 
==The Project (100 Points)==
 
==The Project (100 Points)==
  
Create an interactive application, in which the user can drop a ball against a brick wall. There need to be the following components of the scene:
+
Create an interactive application, in which the user can drop a ball against a brick wall. You will get points for the following things:
  
 
* A ground plane nothing can fall through. (10 points)
 
* A ground plane nothing can fall through. (10 points)
* A wall of bricks, which can be composited of simple [https://www.opengl.org/documentation/specs/glut/spec3/node82.html glutSolidCube]s. Use as many cubes as your computer can render at 30 frames per second (you can manually tweak this number). The cubes can be simulated as [http://bulletphysics.org/Bullet/BulletFull/classbtBoxShape.html btBoxShape]. (15 points)
+
* A wall of bricks, which can be composited of simple [https://www.opengl.org/documentation/specs/glut/spec3/node82.html glutSolidCube]s or rectangles. Use as many bricks as your computer can render at 30 frames per second (you can manually tweak this number). In Bullet, the cubes can be simulated as [http://bulletphysics.org/Bullet/BulletFull/classbtBoxShape.html btBoxShape]. (15 points)
 
* A string, hanging from a point above and in front of the wall, at about half the height of the wall. The attachment point does not need to have geometry. (15 points)
 
* A string, hanging from a point above and in front of the wall, at about half the height of the wall. The attachment point does not need to have geometry. (15 points)
 
* A ball, attached to the bottom end of the string: it can be rendered as a simple [https://www.opengl.org/resources/libraries/glut/spec3/node81.html glutSolidSphere] and simulated as a [http://bulletphysics.org/Bullet/BulletFull/classbtSphereShape.html btSphereShape]. (10 points)
 
* A ball, attached to the bottom end of the string: it can be rendered as a simple [https://www.opengl.org/resources/libraries/glut/spec3/node81.html glutSolidSphere] and simulated as a [http://bulletphysics.org/Bullet/BulletFull/classbtSphereShape.html btSphereShape]. (10 points)
 +
* The camera should initially look at the scene from about the height of the ball, with the ball in the center of the window. Support the WASD keys to trackball-style pivot the scene about the initial location of the ball - or you can use the mouse for this, just make sure you can still grab the ball with it also. (10 points)
 +
* Initially, the ball should hang still on the string. The user should be able to grab the ball with the mouse, lift it up and pull it away from the wall. When the mouse is moved to move the ball, it should move in a plane parallel to that of the monitor. (10 points)
 +
* When the mouse button is released after moving the ball, the ball should swing towards the wall and destroy it with the bricks flying all over the place, calculated by the physics engine. (25 points)
 +
* The simulation should run until the space bar is pressed, at which point it should get reset to the initial state with an intact wall. (5 points)
  
The camera should initially look at the scene from the height of the ball, with the ball in the center of the window. Support the WASD keys to trackball-style pivot the scene about the initial location of the ball - or you can use the mouse for this, just make sure you can still grab the ball with it also. (10 points)
+
Let these images inspire you for what your application could look like:
 
+
Initially, the ball should hang still on the string. Then the user should be able to grab the ball with the mouse, lift it up and pull it away from the wall. (10 points)
+
 
+
When the mouse button is released, the ball should drop and swing towards the wall and destroy it with the cubes flying all over the place. When the mouse is moved, it should move in the plane of the image, so that the ball will move along different planes when the camera is rotated. (25 points)
+
 
+
The simulation should run until the space bar is pressed, at which point it should reset itself. (5 points)
+
 
+
The following images might give you an idea of what this could look like:
+
  
 
[[Image:wrecking-ball.jpg | 250px]]
 
[[Image:wrecking-ball.jpg | 250px]]
Line 41: Line 37:
 
==Extra Credit (10 Points)==
 
==Extra Credit (10 Points)==
  
Add functionality to allow the user to click on the bricks with the mouse and move them, allowing to rebuild the wall manually.
+
Add functionality to allow the user to click on the bricks with the mouse and move them, allowing to rebuild the wall manually, or pushing other bricks around with them, as calculated by the physics engine.

Latest revision as of 11:53, 17 January 2015

Contents

Homework Assignment 1: Wrecking Ball

For this assignment you can obtain 100 points, plus up to 10 points of extra credit.

The goal of this assignment is to create an application which uses the Bullet Engine to simulate a ball hitting a brick wall.

This assignment is due on Friday, January 16th at 1:00pm.

The assignment should be done in teams of two if at all possible.

TA Dylan will do a homework discussion session in CSE lab 220 on Wednesday, January 7th from 4-5pm in CSE basement lab 220.

Bullet Engine

This project as well as all following projects are going to use the Bullet Physics Library. This library allows assigning physical properties such as weight and softness to geometrical objects. Then the physics engine will calculate the objects' motion, applying the laws of physics.

Here is an excellent tutorial on the Bullet Engine.

The Project (100 Points)

Create an interactive application, in which the user can drop a ball against a brick wall. You will get points for the following things:

  • A ground plane nothing can fall through. (10 points)
  • A wall of bricks, which can be composited of simple glutSolidCubes or rectangles. Use as many bricks as your computer can render at 30 frames per second (you can manually tweak this number). In Bullet, the cubes can be simulated as btBoxShape. (15 points)
  • A string, hanging from a point above and in front of the wall, at about half the height of the wall. The attachment point does not need to have geometry. (15 points)
  • A ball, attached to the bottom end of the string: it can be rendered as a simple glutSolidSphere and simulated as a btSphereShape. (10 points)
  • The camera should initially look at the scene from about the height of the ball, with the ball in the center of the window. Support the WASD keys to trackball-style pivot the scene about the initial location of the ball - or you can use the mouse for this, just make sure you can still grab the ball with it also. (10 points)
  • Initially, the ball should hang still on the string. The user should be able to grab the ball with the mouse, lift it up and pull it away from the wall. When the mouse is moved to move the ball, it should move in a plane parallel to that of the monitor. (10 points)
  • When the mouse button is released after moving the ball, the ball should swing towards the wall and destroy it with the bricks flying all over the place, calculated by the physics engine. (25 points)
  • The simulation should run until the space bar is pressed, at which point it should get reset to the initial state with an intact wall. (5 points)

Let these images inspire you for what your application could look like:

Wrecking-ball.jpg Wall.png

Extra Credit (10 Points)

Add functionality to allow the user to click on the bricks with the mouse and move them, allowing to rebuild the wall manually, or pushing other bricks around with them, as calculated by the physics engine.