Thread: FAQ: Graphics Math

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    You are confused as to what is happening.

    First all graphics in 3D are centered around 0,0,0. Every object is centered around 0,0,0 in model space or at least should be or weird things begin to happen. Since you want to always see your 2D wireframe box set the z coordinates to something greater than or equal to 1.0f, but greater than 1.0f is your best bet.

    So imagine a universe. A universe is made of planets. The sun is just another very bright planet. All planets have their center at 0,0,0 in their model space. But you want to transform them to world space. So if you want your model to rotate in model space you must rotate first and then translate. If you translate first and then rotate your rotation will be in world space or will make the planet orbit the sun.

    All models start in model space. They are then transformed to world space. Then to camera/view space, then to clip space, then to screen space.

    It truly is impossible for me to explain 3D mathematics, matrix concatenation, and matrix transformation in one post. I would suggest purchasing a book about 3D to start you on your way. I could write a huge post here with all kinds of code, but it would only confuse the heck out of you. Get a book.
    Last edited by VirtualAce; 09-29-2004 at 11:48 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wiki FAQ
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 192
    Last Post: 04-29-2008, 01:17 PM
  2. an easy, portable, python accessible graphics math library
    By ichijoji in forum Game Programming
    Replies: 2
    Last Post: 12-07-2006, 12:10 AM
  3. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  4. how to use operator+() in this code?
    By barlas in forum C++ Programming
    Replies: 10
    Last Post: 07-09-2005, 07:22 PM
  5. Min Math level req for 3d graphics?
    By EvBladeRunnervE in forum Game Programming
    Replies: 12
    Last Post: 02-24-2003, 10:32 PM