Graphics Codex version 1.7 Released

[This is a guest post from Morgan McGuire. His Graphics Codex is a pretty great thing for anyone who wants just about all graphics formulae and algorithms at their fingertips. It's not a perfect venue yet, but I think this is an extremely interesting alternative to books, since the app can be constantly updated and improved. With links to working code for many of the algorithms, my first question, "how do I copy and paste?", is covered. - Eric]

The Graphics Codex 1.7 costs $9.99 on the App Store. You can install it on multiple iOS devices (I use both an iPad and an iPhone). You also receive free (approximately-) monthly updates of new content and features. It supports all iPads, iPhones, and iPod touches with iOS 5 or later [my experience is that you need iOS 6 - there's a refresh problem with anything older; evidently Apple has changed its scrolling support], although I recommend at least an iPad 2, iPhone 3, or iPod 4.

The Graphics Codex contains about 200 entries on essential computer graphics equations, algorithms, data, and figures. These span quite a range. For example, they include: the formal definition of the BSDF, source code for a shadow map pixel shader, LaTeX commands for image formatting, and figures commonly used in teaching. For me, the historical figures are particularly fun. The staff at the Chapin rare books library helped me to track down first editions of books including Newton’s Opticks, Durer’s perspective manuscripts, and even Lambert’s work. I then scanned these so that you can get Lambert’s law from his original derivation–a kind of vicarious graphics tourism. When lecturing, I connect my iPad to the classroom projector to display these; the students use their iPhones and iPads to pull up equations and details of what I’m writing on the board.

Every month I add new entries based on what I use in my own graphics work and requests that I receive by e-mail. I read all reviews posted on iTunes as well and respond to them with changes. I currently have a queue of 44 new entries to be added. For each one, I cite a primary source and actually implement the algorithm to ensure correctness. The citations include links to canonical (e.g., ACM Digital Library) and free (e.g., author version) PDFs in most cases, so you can quickly jump directly to the source to learn more. Since many functions are also supported under various APIs, I link to DirectX, OpenGL, Mitsuba, etc., documentation as well.

In addition to the reference material, version 1.7 includes “Lecture Notes on Rendering”: twelve long-form chapters suitable for use in an introductory (ray tracing) computer graphics course. This semester I taught graphics at Williams College using this as the primary reading material. I supplemented it with a few chapters from Fundamentals of Computer Graphics 3rd edition, Computer Graphics: Principles & Practice 3rd edition [to be released May 6, 2013 - Morgan is a coauthor], and two research papers: Kajiya’86 and Jensen ’96. The next three chapters I will add in future updates are deep explanations of Photon Mapping, Importance Sampling, and Color Theory. All of these can be used with any API, but are explicitly supported by the open source G3D Innovation Engine graphics library. G3D now includes a complete photon mapping ray tracer that matches the notation and structure of the renderers described in the lecture notes.

On the technical side, I completely rewrote the layout and scrolling engine for this release. The new GPU-accelerated version allows scrolling before layout completes, making even the longest chapters respond nearly instantly. The underlying code uses LaTeX for math typesetting and that runs on a second thread, so if you scroll really fast you’ll see the equations inserted as they are completed. I use dynamic layout instead of static (e.g., PDF) so that content can respond to changing device orientation and re-layout on font change rather than forcing the reader to scroll horizontally. This version also includes support for iPhone 5, iPod 5, and iPad mini resolutions and processors. I recommend using the latest iOS version 6.0.1 because that has the best GPU drivers, but the app supports everything back to iOS 5.1.

I can’t stress enough how liberating and rewarding it has been as an author to release material as an app instead of a book. There are no delays because I release content incrementally instead of in discrete editions, and the quality remains uncompromised by artificial publishing and marketing deadlines–I only release material when it is polished. Direct feedback from readers allows me to support them with appropriate content, and there are zero known errors; as soon as errata is collected, I simply patch the content and push it out to everyone. Selling for 10-20% of the cost of a textbook allows me to reach the hobbyists, indie developers, and students who will be tomorrow’s great developers and researchers. The down side, of course, is that I rely on “word of mouth” (e.g., blogs and Twitter) to promote the app, whereas traditional publications have marketing budgets and campaigns. Now that the app has a critical mass of content, I’m starting to promote it more actively. I look forward to readers letting me know what new features and entries to add in future months.

[p.s. here are links for the Graphics Codex homepage, and Morgan's twitter feed (actually, he has two) and blog.]

Tags: , , ,

  1. Pseudonym’s avatar

    Nothing for Android, then?

  2. Skylark’s avatar

    +1 to that, you should release on Android.

  3. MightTower’s avatar

    +1 for Android

  4. EonStrife’s avatar

    + >9000 for Android

  5. morgan3d’s avatar

    I’d really like to ship an Android version, especially because Android has more market share on phones, albeit possibly low-power phones. I have been maintaining an Android port, but haven’t found a cost-effective way to release it yet, unfortunately. Let me explain the problem and share my frustration with it:

    The Android platform is very fragmented in terms of OS version deployed, OS extensions for different hardware, and hardware capabilities. It is important that The Graphics Codex software runs efficiently and reliably, and Android is a testing and support nightmare (as is Windows for desktop software). For iOS, I have three physical devices plus the simulator. I invest a lot of time ensuring that the experience is as good as possible on all of them, with iPad 2 on iOS 6 as the lead platform. Apple has a single OS version, relatively few form factors and processors, and a single point of contact with readers–the App store. On Android I’d need many more devices (I’ve been testing on a Lenovo tablet so far)

    Unlike an e-book, The Graphics Codex actively performs layout, image resampling, and some interactive computation (e.g., for filter equation plots in the upcoming release). Any Android 4.x+ device can support these features the way that I’ve implemented them, and Tegra 3 devices have sufficient GPU power to perform them well. As of this week, about 25% of Android devices are running 4.x+ (http://developer.android.com/about/dashboards/index.html) I do not know how many of those are running Tegra 3. Unfortunately Android is currently the Linux of mobile for graphics developers; a lot of us like the platform and advocate for it, but it is hard to ship a product for it. And much like Linux, there is no technical barrier for me in releasing a product on it at any point, but it would be unfair to release a product that I wasn’t prepared to support adequately.

    I’m very happy that I’ve been able to respond to every bug report and suggestion for the Graphics Codex, usually within 24 hours and a patch distributed as soon as Apple’s review process allows (about 2 weeks). I won’t release the Android version until I believe that it will run well on every compatible device and that it is feasible for me to support those devices at the same level I have been for iOS. The good news is that Google seems to be exercising tighter control over Android and that more Android devices are shipping with good processors than ever before. If the Google Play store becomes the distribution channel of choice and Android users more consistently update to the latest OS version, then this could become a viable platform for the next Graphics Codex port. Although nobody has asked, right now Windows 8 isn’t on my development roadmap at all. That platform has good control and standards, but is a minority in terms of market share.

  6. Constantine’s avatar

    I’ll buy it if app will be on Android market.

Reply