Here are the relevant class documents.
Here's a link to some of the (good and bad) texture synthesis examples I generated during the project.