DOC PREVIEW
MIT 6 111 - Ray-Cast Three-Dimensional Pong

This preview shows page 1-2-3-23-24-25-26-47-48-49 out of 49 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

- XX - Ray-Cast Three-Dimensional Pong Elizabeth Power! Richard Hughes December 2008- XX - Abstract Project Name: Ray-Cast Three-Dimensional Pong Project Team Members: Elizabeth Power!, Richard Hughes In this project we created a 3-D variant of the pong project from lab 5 with ray-traced graphics. The game will have three dimensions of movement for the spherical puck and two dimensions of movement for the square paddle, and it will keep track of your score (i.e., how many consecutive bounces you’ve managed) on-screen with hardware ‘sprite’ characters. The puck will bounce off the paddle at different angles depending on the relative position of the puck to the paddle. The ray-tracing will include shadows, checkerboard walls, and 8-bit color, with 3 bit red and green and 2 bit blue. - i -- XX - Table of Contents I. Abstract Page i II. Table of Contents Page ii III. List of Figures Page iv IV. Overview Page 1 • Figure 0: Ray-Casting • Figure 1: Python Generated Scene V. Description A. Backend — Elizabeth Power! Page 2 • Figure 2: Pong Backend — Physics • Figure 3: Physics Block Diagram 1. Ready Module Page 4 • Figure 4: Ready Module Counting Diagram • Figure 5: Ready Test Bench Results 2. Puck Module Page 4 • Figure 6: Puck Module Block Diagram • Figure 7: Puck Test Bench Results 3. Paddle Module Page 6 • Figure 8: Paddle Module Block Diagram • Figure 9: Paddle Test Bench Results 4. Game Module Page 7 • Figure 10: Game Module Block Diagram • Figure 11: Game Test Bench Results 5. Score Module Page 10 • Figure 12: Score Module Block Diagram • Figure 13: Score Test Bench Results B. Graphics — Richard Hughes Page 11 • Figure 14: Overall Structure of the Pipelined Ray-Caster 1. Ray-Tracing and Ray-Casting Page 12 2. Ray-Generator Module Page 13 3. Ray Format Page 14 • Figure 15: Ray Generator Figure 4. Sphere-Intersector Module Page 15 • Figure 16: Sphere Intersector Diagram 5. Plane-Intersector Module Page 17 • Figure 17: Plane Intersector Diagram 6. Color Manager Page 18 • Figure 18: Color Managing Diagram - ii -- XX - VI. Conclusion Page 19 VII. References & Appendices Appendix A: Ready Module & Test Bench Page 20 Appendix B: Puck Module & Test Bench Page 21 Appendix C: Paddle Module & Test Bench Page 24 Appendix D: Game Module & Test Bench Page 25 Appendix E: Score Module & Test Bench Page 26 Appendix F: pong_game.v Page 31 Appendix G: ray_generator.v Page 35 Appendix H: fast_sphere_intersector.v Page 36 Appendix I: plane_intersector.v Page 40 Appendix J: good_color_manager.v Page 43 - iii -- XX - List of Figures Figure 0: Ray-Casting Page 1 Figure 1: Python Generated Scene Page 2 Figure 2: Pong Backend — Physics Page 3 Figure 3: Physics Block Diagram Page 3 Figure 4: Ready Module Counting Diagram Page 4 Figure 5: Ready Test Bench Results Page 4 Figure 6: Puck Module Block Diagram Page 5 Figure 7: Puck Test Bench Results Page 5 Figure 8: Paddle Module Block Diagram Page 6 Figure 9: Paddle Test Bench Results Page 7 Figure 10: Game Module Block Diagram Page 8 Figure 11: Game Test Bench Results Page 9 Figure 12: Score Module Block Diagram Page 10 Figure 13: Score Test Bench Results Page 10 Figure 14: Overall Structure of the Pipelined Ray-Caster Page 12 Figure 15: Ray Generator Figure Page 14 Figure 16: Sphere Intersector Diagram Page 16 Figure 17: Plane Intersector Diagram Page 18 Figure 19: Color Managing Diagram Page 19 - iv -- XX - Overview Ray-tracing is a graphics rendering algorithm that logically renders a three-dimensional scene pixel-by-pixel. Each pixel corresponds to a single ray projected from a particular ‘view point’; the rays are projected as if to intersect with the ‘pixels’ on an imaginary ‘screen’ defined in the 3Dwhat?. Geometrical analysis is performed to determine what objects in the simulated 3D space each ray intersects and we perceive the closest intersection. We then perform geometric analysis to determine how much light each light-source casts on to that intersection surface by casting rays from the intersection to the light and determining the angle of incidence, how distant and bright the light is, and whether the light is shadowed. We sum this light, determine how much of it is being sent towards the screen, and that is the color of the pixel. We then repeat that for every pixel. In Figure 0, below, the ‘center of projection’ represents the ‘view point’ and the surface of the picture plane represents the screen. This illustrates how one might determine what point on the screen corresponds to a given point in 3-dimensional space. Figure 0: Ray-Casting* Technically, this process is called ‘ray-casting’, meaning that it is not iterative — ray-tracing is, technically, an iterative form of this process that uses rays cast off from the point of intersection to accurately model such effects as reflection, transparency, refraction, or shadows that blur with distance. We will not be attempting to model such effects as reflection or refraction and so recasting is sufficient for our needs. As a result, the mathematics required to calculate the intersection of a raw with any given geometry are bounded, and thus we can run each intersection-calculation in parallel without worrying about one taking a far longer time than another. Using this graphics system we are able to three dimensionally represent the physics of our Pong game. Within the game, we will use all of the basic rules of traditional Pong, with a twist. Traditional Pong is a two dimensional simulation of table tennis, where the players hit a ball back and forth with paddles and are allowed to bounce the ball off the walls. Our Pong will use a “puck,” as opposed to a ball, that will bounce off the walls in * Image courtesy "The Arrow in the Eye" by Michael Kubovy, Christopher Tyler and WebExhibits. - 1 -- XX - the scene at the same angle which it hits the wall. There is also a paddle that will be used to keep the puck within the scene and collect points, just as in traditional Pong. Our scene will include five planes and a sphere, as illustrated in Figure 1 below. Four of the planes — left side, right side, top, & bottom — will be sloped so that they are smaller at the back of


View Full Document

MIT 6 111 - Ray-Cast Three-Dimensional Pong

Documents in this Course
Verilog

Verilog

21 pages

Video

Video

28 pages

Bass Hero

Bass Hero

17 pages

Deep 3D

Deep 3D

12 pages

SERPENT

SERPENT

8 pages

Vertex

Vertex

92 pages

Vertex

Vertex

4 pages

Snapshot

Snapshot

15 pages

Memories

Memories

42 pages

Deep3D

Deep3D

60 pages

Design

Design

2 pages

Frogger

Frogger

11 pages

SkiFree

SkiFree

81 pages

Vertex

Vertex

10 pages

EXPRESS

EXPRESS

2 pages

Labyrinth

Labyrinth

81 pages

Load more
Download Ray-Cast Three-Dimensional Pong
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Ray-Cast Three-Dimensional Pong and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Ray-Cast Three-Dimensional Pong 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?