Joeys patches 2

This is a re-spin of Joey Durkin's set of patches, with minor edits on my behalf. This supersedes pull request #162.
Possible values for 3d are 6, 12, and 96. Due the multiplication by 8 above, the user can only pick 12 (and get 96). I would suggest:

  - set the default to 0, which means automatic (12 or 96)
  - do not multiply by 8
  - state that the value is arbitrary in 2d and need to be in {6, 12, 96} in 3d.