#WBL 12 Mar 2005 For Chapter 2 www pages. Needs gnuplot 4 #WBL 11 Jan 2001 created set term gif set out "landscapewave.gif" set label "Foundation of Genetic Programming page 20" at 11,9,-3 right set nokey pi = atan(0.5)*4; pi2 = pi+pi; Sin(x) = sin(x-int(x/pi2)*pi2); ax(i,j,theta) = cos(theta)*i-sin(theta)*j; ay(i,j,theta) = sin(theta)*i+cos(theta)*j; wave1(i,j) = exp(-((i*i)*(j*j))/25)*Sin(i); wave2(i,j) = Sin(i); wave3(i,j) = Sin(i*10); all(i,j) = wave1(ax(i,j,.5),ay(i,j,.5)) + \ wave2(ax(i,j,.2),ay(i,j,.2)) + \ 0.1*wave3(ax(i,j,0),ay(i,j,0)); set xrange [0:5*pi] set yrange [0:5*pi] #set palette gray set pm3d at s hidden3d 100 set style line 100 lt 1 lw 0.5 unset hidden3d unset surf set contour base set hidden set isosample 100 set ticslevel 0 splot all(x,y)**2 #notitle with line #pause -1