Nothing is more free than the imagination of man; and though it cannot exceed that original stock of ideas furnished by the internal and external senses, it has unlimited power of mixing, compounding, separating, and dividing these ideas, in all the varieties of fiction and vision.
 David Hume, An Enquiry Concerning Human Understanding (1748). copy citation

Context

“By this means we may meet with some explications and analogies that will give satisfaction; at least to such as love the abstract sciences, and can be entertained with speculations, which, however accurate, may still retain a degree of doubt and uncertainty. As to readers of a different taste; the remaining part of this section is not calculated for them, and the following enquiries may well be understood, though it be neglected.
PART II.
39. Nothing is more free than the imagination of man; and though it cannot exceed that original stock of ideas furnished by the internal and external senses, it has unlimited power of mixing, compounding, separating, and dividing these ideas, in all the varieties of fiction and vision. It can feign a train of events, with all the appearance of reality, ascribe to them a particular time and place, conceive them as existent, and paint them out to itself with every circumstance, that belongs to any historical fact, which it believes with the greatest certainty.” source