Tutorial Number 7
Expanding a Random Pattern
Lets start with a 128 random pattern.
Open a 128 window select random on the goodies menu enter this 1,-1 and save the small binary file as "128Random.CoOpB". Fourier transform this and save the big Floating point array as "128RandomF.CoOpF" The task is now to reproduce this in a 256 array as 2 by 2 squares.
To do this open a 256 array document and open the script window. We are going to place 4 coppies of the "128RandomF" data on the 256 array we do this by convolving data with 4 dots. Make a script that looks like this.
Set the first dot to enter dot at (0,0) in big array. This clears the array and puts one dot at the center. The next three icons should enter (add) dots at (-128,0), (0,128), and (-128,128). These dots are transformed and the result saved. The next line places the "128RandomF" data into the center of the 256 array, inverse transforms it multiplies the result by the transform of the 4 dots and finally does a transform and display. The result of the calculation is four coppys of the "128RandomF" data. This is hard to see, but if you look closely its there.
Set the display to colorize real part and enlarge the screen to magnification 8 and inverse transform the result. The screen shows yellow and magenta
spots separated by black spots. Three black for each color. Not what we wanted.
To fix this we add a row before the four dot icons which also has four dot icons and add a few more icons at the end.
The new four dots are enter (0,0) and add (1,0),(0,-1),(1,-1). The saved array at the end of the line is asentually a two dimensional "sinc" function (somewhat phase shifted) with which we multiply the big array. A final inverse Fourier transform and a mask-maker icon set to 1,-1 on the real part (from above) makes a clean mask such as that below.
Compare this array with the original 128 array. They should look much alike.