=-((((COS(PI()*(ROW())/(COLUMN()))^2-1))^2-epsilon)/ABS((((COS(PI()*(ROW())/(COLUMN()))^2-1))^2-epsilon))-1)/2 where epsilon is a small number. This gives the mod pattern also although not in a “clean” way.