changed to do pattern generation at 1000x1000 then resizing down to 500x500 with anti-aliasing