Big Stripey Lie

Single color objects are boring, so some color patterns would be a nice addition. Like stripes, alternating between two colors, a and b.

def color_at(point)
  (point.x.floor % 2).zero? ? @a : @b
end

Big Stripey Truth

Ok, uniform stripes all over the world is not the best thing, so they need to have transforms attached, like everything else. That’s more like it.

def color_at_object(object, point)
  object_point = object.inverse * point
  pattern_point = @inverse * object_point
  color_at(pattern_point)
end