n=16 circum = 7.112*2*pi length=circum/n do for [i=1:n]{ y(i]=amp*cos(2*pi/n*i set object rect i from y[i]-length/2,0.1 to y[i]+length/2,-0.1 } set xrange [0:circum] set yrange [-5.:5.] plot