Essential Math Weblog

5/15/2011

Collision Response errata

Filed under: Erratical — Jim @ 8:38 pm

On page 636 of the second edition, the second paragraph begins as follows:

Each object will have its own value of epsilon. [...]

On page 637, equation 13.18 contains a term epsilon_a, and below it is written

The equation for j_b is similar, except that we substitute epsilon_b for epsilon_a.

The code on page 638 follows this by referring to m_Elasticity and other->m_Elasticity.

These assertions are incorrect. The coefficient of restitution is not a property of an individual object — it is a property of the collision itself. This can be seen clearly in equation 13.15, which applies to both objects. So if we are considering four materials A, B, C, and D, there would be six possible coefficients of restitution: A colliding with B, A colliding with C, A colliding with D, B colliding with C, B colliding with D, and C colliding with D.

Many thanks to James McGovern of the Art Institute of Vancouver for pointing this out.

An error that was corrected in the second edition, but is not noted in the errata for the first is in the equation for the impulse magnitude for rotational collision (Equation 12.24, page 618). The sum of cross products in the denominator should be dotted with the normalized collision normal.

And in both editions, the moments of inertia tensors used in the collision response equations (on pages 617-618 in the first edition, and page 639 in the second edition) are referred to as I_a and I_b. These should be J_a and J_b to match the previous notation used. The intent of this was to separate the notation for the identity matrix from the notation for the inertia tensor. However, standard convention is to use I for the inertia tensor, hence the typo.

Thanks for Johnny Newman, also of Vancouver, for discovering the latter two errors.

Apologies for any confusion any of this may have caused readers.

2/23/2011

2011 GDC Tutorial Lineup

Filed under: Tutorial — Jim @ 10:06 pm

Here’s the lineup for this year’s Physics for Programmers tutorial. Times are approximate, but should be pretty close:

10:00-10:10 – Introductions
10:10-11:00 – Squirrel Eiserloh – It’s All Relative
11:00-11:15 – BREAK
11:15-12:00 – Erwin Coumans – Game Physics Artifacts
12:00-12:30 – Jim Van Verth- Numerical Integration
12:30-14:00 – LUNCH
14:00-14:50 – Gino van den Bergen- Collision Resolution
14:50-15:25 – Takahiro Harada – GPU Physics
15:25-16:00 – Glenn Fiedler – Networked Physics
16:00-16:15 – BREAK
16:15-17:10 – Erin Catto – Soft Constraints
17:10-18:00 – Kees van Kooten- Fluids

I’m definitely looking forward to it, should be a great day of physics talks. Hope to see you Tuesday, March 1, in Room 3007, West Hall Moscone Center.

2/21/2011

A Pair of Pertinent Podcasts

Filed under: Mathematical — Jim @ 12:00 pm

These have been in the queue for a while, but the BBC podcast In Our Time recently (as in the past six months) covered two more mathematical topics related to the book. The first is on http://www.bbc.co.uk/programmes/b00tt6b2, which is useful if you’re interested in having a deeper understanding of quaternions. The second is on random and pseudorandom numbers, which parallels one of the chapters in the second edition. I highly recommend the podcast in general, as well. Each show is about 45 minutes long, and features a panel of three experts on each topic moderated by Melvin Bragg.

12/28/2010

Two CD Updates

Filed under: Erratical — Jim @ 9:36 pm

Yes, it’s been a while. But here are two updates for those who make use of the CD that comes with the book.

First, Ben Bass over at Coded Structure wrote to let me know that the code on CD doesn’t build properly with Mac OS 10.6. Fortunately he has provided a guide on his blog showing how to patch up the Makefiles. Thank you, Ben!

Secondly, another reader wrote to point out that the CD notes say that built Windows versions of the OpenGL examples would be provided, but in fact they aren’t on the CD. These are now available in a separate zip file which you can download here.

8/6/2009

Mike Acton Takes on C++ Math Libraries

Filed under: General,Mathematical — Jim @ 11:57 am

A couple weeks ago, Mike Acton, head of Core Technologies at Insomniac (where I’m now working, btw) posted this reaming of some standard C++ math code. I think it’s an excellent read if you’re interested in deeply optimizing your math code, in particular for consoles, and in particular for the PS3.

Of course, posting this at all is a bit uncomfortable from where I’m sitting.  I think it’s safe to say that if you were to compare our library code to what he is, er, analyzing, you’d find some significant similarities. However, our libraries were mainly designed to teach mathematical concepts rather than optimization concepts. As such, you end up with classes that represent mathematical entities, e.g. Planes, Spheres, Lines, etc. and simple code that emphasizes clarity. That said — as Mike’s slides aptly demonstrate — if you’re trying to squeeze every cycle out of the machine there are other ways to organize your data and code, and in fairness we didn’t address that much at all.  In retrospect this was an unfortunate oversight. I’d say more emphasis on optimization would be a good addition to the Third Edition, but I’m not sure what my family would think of another book…

6/10/2008

Indexed

Filed under: Mathematical — Jim @ 10:17 am

As part of the book review (see previous article), they have images from the Indexed weblog.   If you like graphical math jokes, you might find them amusing.

Probability Resources

Filed under: Mathematical — Jim @ 10:05 am

For those who are not aware, there is a new chapter in the book about Random Numbers.  Because it is only a 50 page chapter in a much larger work, I don’t go into as much detail as I would have liked about probability.  So I recommend a couple of longer works dedicated to the subject.  One is Grinstead and Snell’s Introduction to Probability, which I had the honor of being taught from (in a pre-release edition) by John Kemeny.  The other is Larry Gonick’s Cartoon Guide to Statistics, which is a surprisingly informative little book.  However, after seeing a review of The Drunkard’s Walk: How Randomness Rules Our Lives, by Leonard Mlodinow, I may have a third.  I recommend at least reading the review, and possibly checking out the book.

And if you’re into podcasts (and who isn’t, really?  But I jest), the BBC’s In Our Time podcast has a episode about Probability.  I haven’t had a chance to listen to it yet, but if it’s like their other programmes, I’m sure it will be quite interesting and informative.

4/17/2008

It’s Done

Filed under: General — Jim @ 9:57 pm

After months of hard work, we’re finally done with the Second Edition.  It went to the presses last week, and it will be available May 16th.  Pre-order it now.

2/8/2008

Manifests and FAT32

Filed under: General — Jim @ 9:31 am

The following drove me crazy for the past few weeks, so I figured I’d better post about it just to get the word out.

For those who don’t know, VS 2005 added the notion of a “manifest” to manage DLLs. Every application must have a valid manifest, or you can’t run. In general, you can use the default settings, but if you’re running on a FAT32 partition (which I am, as I share it through BootCamp), for some reason it just doesn’t always create the manifest correctly. Beats me why since I’d think that sort of thing should be independent of what file system you have, but there you go. The solution is to check the “Use FAT32 work-around” option in the Manifest Tool section of the main project’s properties.

Now I can finally go through and update all of the examples to use our new rendering platform — it took a bit to put together, but we finally have a cross-platform renderer that supports both OpenGL and D3D9.

12/6/2007

Second Edition Update

Filed under: General — Jim @ 11:16 am

Sorry about the long delay between updates: things have been very busy here in Chez Jim.

Lars and I have been hard at work on the second edition, and are wrapping up the text this week to be shipped to the publisher. The major changes are:

  • Brand new chapter on random numbers
  • The three core rendering chapters have been completely rewritten for vertex and fragment shaders
  • Direct3D 9 and OpenGL 2 support added

In addition, all the remaining chapters have been revised for clarity, corrections and updated content. Skinning and morphing unfortunately didn’t make it into the main text because of space, but may end up on the CD or may be posted on this site at some point. Availability of this edition will be sometime next year.

A few bits of other news:

  • Lars and I are both at NVIDIA Corporation now. Lars is working on mobile technology, and I’m working on OpenGL drivers.
  • I should be at GDC in 2008, although that may be up in the air.

That’s about it for now. I’ll update as the process continues to let you know how it’s going.

1/16/2007

Mac OS X issues

Filed under: General — Jim @ 8:36 pm

I’ve had a couple reports of issues with the OS X libraries as shipped with the book.  The problem appears to be that the libraries are compiled for Mac OS 10.2, but don’t work so well with 10.3 and particularly 10.4 and up.  And the fact that they are compiled for a PowerPC architecture doesn’t help the new Intel machines.

The solution is simple: recompile the libraries.  To do so, you’ll need to make sure that all the files are writeable.  Open a terminal window and change to the “common” directory and then type:

make clean PLATFORM=OSX
make PLATFORM=OSX

If you still have issues after doing this, let me know and we’ll try to track it down.

Note that this is the same procedure you’ll have to follow for the Linux builds, except that the platform doesn’t need to be specified.  While the libraries are compiled under an older version of Mandrake, there is no guarantee that they will work for other Linux builds or versions.

5/16/2006

Math Library discussion

Filed under: General — Jim @ 7:53 pm

For those who are interested in the process of construction of a math library, or perhaps are interested in other people’s opinions on how such a library would be constructed, or perhaps would like to share your own opinions on such a library… er, I’ll start again.

In the sweng-gamedev mailing list, Noel Llopis started up a thread regarding the creation of a industry-wide standard math library. This has led to a very long discussion of such a library, and the creation of a wiki page. As of yet I don’t have much of an opinion on this other than the discussion is extremely verbose and so I can’t keep up with it all. However, someone out there might, and so I share its existence with you all.

Some of this may meander into the next edition of the book, particularly the management of SIMD operations which is something I’m dealing with in my company’s library. However, I can say for certain that there will not be a separate Point class in the book’s library, because a) it’s simpler to manage and b) I trust people not to do dumb things with Vectors when they’re actually Points. This may be a foolish assumption on my part.

Addendum (05/19/06): there’s also a SourceForge page to deposit potential code for said library.

4/19/2006

Second Edition

Filed under: General — Jim @ 8:04 pm

Just a quick note to say that a second edition for Essential Mathematics for Games… is in the works.  If you have items that you would like to see updated, expanded, or just plain included in a new edition, please let me know.  Also, if you’re an educator and you’re using this book as part of a course, please drop me a line as well.  We may be interested in having you do a detailed review of the first edition.
You can send me email at ‘jim’ at this domain, or use the form on the front page of the site.

Thanks in advance.

12/11/2005

Some Fun Science and Math Links

Filed under: General — Jim @ 10:13 pm

I had originally intended on writing up a post about some of the science and math I’ve been seeing on TV lately. However, as I got into it, I realized it was going to end up too long, too verbose and (more importantly) without a point. A boring rant for ranting’s sake, if you will. So… y’all (or youse guys, if you prefer) get this post instead: a series of fun math- and science-related links which provide a nice diversion on slow days.
(more…)

11/16/2005

General and Lighting Updates

Filed under: General,Personal — Jim @ 9:12 pm

First of all, my apologies for the lack of posts. Part of it was the demands of my paid work: For some time, I’ve been working on the PS2 version of Rainbow Six: Lockdown, and those of you in the know are aware that the ship date was pushed out from March to September. While most of that was just polish, doing that final 1% takes a fair amount of effort. So only recently have I felt like digging into new engineering challenges and blogging again. The other part was that I didn’t have much to write about, but I have some ideas which I’ll put up in the next few weeks.
(more…)

11/11/2005

GDC Update

Filed under: General,Tutorial — Jim @ 8:51 pm

The GDC sessions have finally been announced, and I’m pretty excited about the tutorial this year. Instead of doing the usual 2-3 people talking about a variety of subjects, some of which is not their specialty, this year we have 6 people with a broad range of experience. This should allow us to have deeper coverage and present an overall better tutorial.

Here are the speakers, with their current proposed topics:

Jim Van Verth: Physics Engine Overview
Christer Ericson: Numerical Robustness
Squirrel Eiserloh: Relative Motion and Collision
Gino van den Bergen: Narrow (GJK) and Broad (Sweep and Prune) Phase Collision
Erin Catto: Constraints and Solvers
Marq Singer: Dynamic Destruction

The full session description can be found on the GDC 2006 site. Hope to see some of you there!

11/5/2005

More errata

Filed under: Erratical — Jim @ 9:41 pm

A couple more errata have come in since the last update. From Tim Lowery comes:

“On page 117, the figures look mislabeled, or the axis is incorrect. For example, Figure 3.5a shows x-axis rotation, but the object is rotating around the y-axis. Likewise, for Figure 3.5b.”

In this case, the captions are correct (the intent is to go in x-y-z order), but the figures are reversed.

From k. avery comes:

“At the end of p. 623, cot theta should be csc theta / sec theta, not sec theta / csc theta.”

Indeed it should be. And I had thought I caught that one once before. Evasive devils, those cotangents.

7/29/2005

Errata and Patch Files

Filed under: Erratical — Jim @ 10:13 pm

I’ve finally gotten around to creating a formal errata file, and a code update. The code update is an encrypted ZIP file; the password is the second word on page 37. The paths should be set up correctly to match the original CD. To use, simply unzip it to the directory where you copied the CD contents.

If there are issues, you can post a comment here, or write me by using my first name at this domain.

6/7/2005

Reparameterizing a Curve, Part Three

Filed under: Erratical,Mathematical — Jim @ 9:08 pm

Now we come to the final part: merging Newton-Raphson and bisection together, and choosing the correct one depending on the situation.
(more…)

5/11/2005

Reparameterizing a Curve, Part Two

Filed under: Erratical,Mathematical — Jim @ 9:11 pm

Due to preparing for a week of vacation, and then going on a week of vacation, and then recovering from a week of vacation, this blog has fallen from the wayside a bit. But I’m back, and I’ll try to wrap up this topic in a couple of postings.

When last we left our intrepid heroes, we were discussing Newton-Raphson root finding, how it’s used for reparameterizing a curve, and when it fails (namely when the speed on the curve approaches zero). The solution hinted at was the bisection method.
(more…)

Older Posts »

Powered by WordPress

Bad Behavior has blocked 166 access attempts in the last 7 days.