|
Post by PeterMaria on Dec 22, 2015 11:35:27 GMT -5
Hello, Caution! can dizziness cause.
glMatrixMode (GL_PROJECTION) glLoadIdentity() glOrtho (0,windowwidth(),windowheight(),0,-1,1) glMatrixMode (GL_MODELVIEW) glDisable (GL_DEPTH_TEST) glEnable (GL_LINE_SMOOTH) glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
sub FillCircle(cx#, cy#, r#) glEnable(GL_BLEND) glLineWidth(1.0) dim theta# = 2*3.1415926 dim c# = cosd(theta#) dim s# = sind(theta#) dim x# = r#, y# = 0 dim t#, i glBegin(GL_POLYGON) for i=0 to 360 step 6 glVertex2f(x# + cx#, y# + cy#) t# = x# x# = c# * x# - s# * y# y# = s# * t# + c# * y# next glEnd() glDisable(GL_BLEND) end sub Sub DrawCenter(x,y) dim sx = x-40 dim sy = y-40 fillcircle(sx, sy, 10) End Sub
dim i#, a#, x, y while scankeydown(27)=0 glClearcolor( 0,0,1,1) glClear(GL_COLOR_BUFFER_BIT)
for i#=0 to 230 x = sin(a#*i#) * i# + 200 y = cos(a#*i#) * i# + 200 glcolor3ub(i#,i#,i#) DrawCenter(x+150, 80+y) next
a# = a#+.0001 if a# >=360 then a#=-a#: end if swapbuffers() waittimer(10) wend
|
|
|
Post by matthew on Dec 23, 2015 14:35:41 GMT -5
Very innovative spiral, Peter. :-)
|
|