kooogy is right, you already posted the same question yesterday (I removed it). Avoid duplicates, please.
I used the search too, and found another old thread:
http://www.processing.org/discourse/beta/num_1203512880.html
Several links are given, perhaps one implementation fits your needs.
From a theoretical point of view, it doesn't looks very hard to implement a pattern dither, anyway. Say you make a number of 3x3 patterns (or more), representing various shades of gray (more than 50 if you want!). Split the image in (virtual) fragments of this size, compute the average brightness of the pixels of each fragment, replace the fragment with the pattern of corresponding gray level.
(Alternative: make an image three (or more) times bigger, and just take the gray level of each pixel of the original image.)
If I have time today, I can attempt an implementation, just for the fun of it...