Advanced Pixel Generator Code