Don't Forget About CGGeometry Reference

Feb 8, 2012

If you find yourself doing something like the following, there’s a much easier way.

CGFloat xCenter = rect.origin.x + (rect.size.width / 2)

CGGeometry.h defines some incredibly handy macros (documented in CGGeometry Reference) that make easier.

For example, the above could simply be

CGFloat xCenter = CGRectGetMidX(rect);

A few more handy examples

// Determine if 2 rects intersect each other
if (CGRectIntersectsRect(rect1, rect2)) {
	// Collision

// Shrink a rect around its center, passing width and height deltas
CGRect smallerRect = CGRectInset(sourceRect, 50, 100);

// Grow a rect around its center, passing width and height deltas
CGRect smallerRect = CGRectInset(sourceRect, -50, -100);

// Create a new rect from the intersection of 2 rects
CGRect intersectionRect = CGRectIntersection(rect1, rect2);

Getting Slender

Feb 7, 2012

Slender iconIf you’re an iOS or Mac developer who creates image-heavy apps, you’re going to want Slender (Mac App Store Link) by Dragon Forged Software. Slender analyzes an Xcode project and identifies unused images, images that lack an @2x counterpart (as well as flags @2x images that aren’t the correct resolution) and allows you to see which files use which images. On sale now for $4.99.

Previously, my solution involved searching through Nibs to look for specific references.

grep -i -r --include=*.xib "image-name.png" /PathToNibs

While this approach has its charms, Slender is more convenient and does much more.

GuitarToolkit 2.0 Instrument Icons

Feb 2, 2012

With the release of 2.0, GuitarToolkit users have the ability to create and customize instruments. What good is customization if you can’t change the icon? Here’s a sampling of the icons I created in Photoshop for this update.

GuitarToolkit instrument icons

AmpKit Link HD Industrial Design

Jan 27, 2012

Here are a few renders of the recently announced AmpKit LiNK HD. Designing the HD was, as usual, a series of complicated tradeoffs made in the hope of finding the right balance. Core requirements of the HD are: pocketability, durability, physical gain controls, detachable cable, power adapter port and support for a belt / strap clip. The surface is a rubberized coating, which feels great in the hand.

I iterated a number of different form factors, but ultimately we settled on a design comparable to the original LiNK due to its flexibility. The folks at Peavey were, as usual, great to work with.

These shots were modeled in modo and rendered in Cinema 4D using V-Ray. AmpKit Link HD image AmpKit Link HD image AmpKit Link HD image


Oct 3, 2011

Rolleiflex My first foray into V-Ray for rendering. Basic modeling in modo, then exported to Cinema 4D using the Collada format.


Aug 2, 2011

Lotus Some more testing of the modo to Cinema4D rendering pipeline. A fun side project with a beautiful machine as the subject.

Update: I was asked for a wireframe shot of the Lotus, so here it is. This is before subdivision. Lotus Wireframe


Jul 8, 2011


Racing Wheel

Jun 24, 2011

Racing Wheel Exploring more complex mechanical shapes in modo.


Jun 2, 2011

NES I’m regularly amazed at how easy it is to get good results with the built-in Cinema 4D renderer. As usual, modelled in modo.