3d Programming Basics: Working with and Visualizing Vectors
One of the most useful tools in the XNA 3d programmer’s bag is the ability to effectively manipulate vectors. It may be more accurate than you think to say that “the vast majority of 3d programming lies in the effective manipulations of vectors”. Although there is an underlying need to utilize vector math to do this, learning the math itself is not as necessary as you might think. That’s because the Xna framework has so many built-in methods that perform the math for you and that shields you from much of the hard-core math. The thing you as a programmer do need to know is what the framework can do for you and how to use it. So, there won’t be much math going on in this post other than arithmetic but hopefully you can gain an understanding of how to work with vectors.
I seem to have an idea that to work with 3d programming concepts, you must be able to visualize in your mind’s eye what it is that you want to happen through code with a high level of accuracy. For instance, as you write a line of code that, say, transforms a Vector3, I believe it’s important to see it happen in thought. And not just see it, but see it accurately. A person brand new to 3d programming generally has a thick foggy mind’s eye view of these concepts for quite some time until experience slowly warms that conceptual landscape enough to burn off the fog and ‘see’ things happening. Often you read forum posts where the questioner posts some code and expresses frustration because it isn’t doing what they want it to. Someone who reads the posted code, and while doing so watches, in their mind’s eye, what is happening can generally identify the person’s problem. Often, the problem is with the way the OP visualizes their code running. They experience a difference between the visualization and the code. It could be a lack of understanding what the code does or a lack of visualization accuracy. The intent of this series of posts is to assist a beginner by helping them establish a visualization foundation for various vector manipulations while offering an overview of some of the common vector uses in game development. Hopefully it will burn off some of the fog for a beginner.
What were going to go over
- What is a Vector
- Vector addition/subtraction
- Vector length/Distance
- What is Vector normalization
- Lerp
- Transform
- Vector Dot product.
- Vector Cross Product
- The ol’ triple Cross
The topics above are currently in progress but as they get completed, the above list will turn into links.
Steve, What happened?
I’m waiting on the remaining topics.
Your blog has been most helpful.
Hi, I’m still here and still going to continue the series. Ive been busy lately making a game so there’s not been much free time but I will pick it up soon… Thanks for the reminder
I would also appreciate blog posts on the remaining topics.
Steve,
I hope you continue the series. This is still the best game math reading I found on the web.
Yeah, looking forward for more topics, thats the best vector/3d basics summary I’ve seen on the web.
I will pick up soon he says, that was April 28, 2010 at 1:01 pm, yeah nice one Steve
I have been surfing online more than three hours today, but I by no means discovered any
fascinating article like yours. It is lovely worth sufficient for me.
In my view, if all web owners and bloggers made just right content as
you probably did, the internet can be a lot more useful than ever
before.