|
Post by PeterMaria on Jul 17, 2015 11:05:13 GMT -5
Hello,
Sub Init2D(width,height) glMatrixMode (GL_PROJECTION) glLoadIdentity() glOrtho(0,width,height,0,-1,1) glMatrixMode (GL_MODELVIEW) glDisable(GL_DEPTH_TEST) End Sub
Sub SetPoint(x,y,size#) glPointSize(size#) glBegin(GL_POINTS) glVertex2i(x,y) glEnd() End Sub
dim j#, angle#, px#, py#, amp#, frq#, fg# dim c, i, fl, height,width,r,g,b height= 480 width = 640 amp# = 30 fg# = 3.5 Init2D(640,480)
for i=-75 to height+75 angle#=0 frq# = frq#+.002 for j#=0 to width+75 py# = i+sind(angle#)*amp# angle# = angle# + frq# r = abs(py#-i)*255/amp# g = 255-abs(py#-i)*255/amp# b = j#*(255/(width+50)) for fl=0 to fg# fl = fl+1 glColor3ub(r,g,b) SetPoint(j#-fl,py#-fl,2) SetPoint(j#, py#,2) SetPoint(j#+fl, py#+fl,2) next next waittimer(5) swapbuffers() next
|
|
|
Post by matthew on Jul 17, 2015 15:32:35 GMT -5
That looks excellent Peter, very nice effect. :-)
|
|