This page is optimized for mobile devices, if you would prefer the desktop version just click here

1.13 Game 2302-0135: venturing into a 3d world

Learn how to update the game-math library to support 3D math, how to program the equations for projecting a 3D world onto a 2D plane, and how to add vectors in 3D. Also learn about scaling, translation, and rotation of a point in both 2D and 3D, about the rotation equations and how to implement them in both 2D and 3D, and much more.

Table of contents

Preface

This module is one in a collection of modules designed for teaching GAME2302 Mathematical Applications for Game Development at Austin Community College in Austin, TX.

What you have learned

In a previous module, I presented and explained four programs that used the game-math library named GM2D04 . One of those programs taught you how to use the addVectorToPoint method of the GM2D04.Point class to translate a geometric object from one location in space to a differentlocation in space.

Another program taught you how to do the same thing but in a possibly more efficient manner.

The third program taught you how to do rudimentary animation using the game-math library.

The fourth program taught you how to use methods of the game-math library to produce relatively complex drawings.

All of the programs were interactive in that they provide a GUI that allows the user to modify certain aspects of the behavior of the program.

What you will learn

The most important thing that you will learn in this module is how to update the game-math library to support 3D math and how to produce 3D images similar tothat shown in Figure 1 .

Figure 1 A 3D image produced using the game-math library.

And a whole lot more...

You will learn much more than that however. Some highlights of the things you will learn are:

  • How to program the equations for projecting a 3D world onto a 2D plane for display on a computer screen.
  • How to cause the direction of the positive y-axis to be up the screen instead of down the screen.
  • How to add vectors in 3D and how to confirm that the head-to-tail and parallelogram rules apply to 3D as well as to 2D.
  • About scaling, translation, and rotation of a point in both 2D and 3D.
  • About the rotation equations and how to implement them in both 2D and 3D.
  • How to rotate a point around an anchor point other than the origin.
  • About the right-hand rule.

Viewing tip

I recommend that you open another copy of this module in a separate browser window and use the following links to easily find and view the Figuresand Listings while you are reading about them.

<< Chapter < Page Page > Chapter >>

Read also:

OpenStax, Game 2302 - mathematical applications for game development. OpenStax CNX. Jan 09, 2016 Download for free at https://legacy.cnx.org/content/col11450/1.33
Google Play and the Google Play logo are trademarks of Google Inc.
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use and Privacy Policy.