number ncols = 512
number ocol = ncols*0.6
number nrows = 512
number orow = nrows/2

image pic := realimage("GPA Test 2", 4, ncols, nrows)

SetScale(pic,0.02,0.02)
SetUnitString(pic,"nm")

number dx1 = 15
number dx2 = 15.6
number dy1 = 15
number dy2 = 15.7

pic = tert(icol<ocol, cos(2*Pi()*(icol-ocol)/dx1), cos(2*Pi()*(icol-ocol)/dx2))
pic = pic + tert(irow<orow, cos(2*Pi()*(orow-irow)/dy1), cos(2*Pi()*(orow-irow)/dy2))

pic = pic + GaussianRandom()*0.2

pic = pic**2 + 1

showimage(pic)