class Ray def initialize(origin = Point.new, direction = Vec3.new) @origin = origin @direction = direction end attr_reader :origin, :direction def at(time) @origin + (@direction * time) end end