|
Post by PeterMaria on Jul 21, 2015 11:53:46 GMT -5
Hi,
Declare Sub Init2D(width,height) Declare Sub SetPixel(x,y,size#)
dim w=400, h=300 dim xs#=1, ys#=1 dim a#=700 dim b#=a#*a# dim c#=600 dim q#,r#,y#,i#,m#,n#,p#,x#,st#,s# dim ia#=1/a#
Init2D(800,600) glEnable(GL_POINT_SMOOTH) for x#=0 to a# s# = x#*x# p# = sqr(b#-s#) st#=6*ys# for i#=-p# to p# r# = Sqr(s#+i# * i#)/a# q# = (r#-1) * sin(-48*r#) y# = i#/3 + q#*c# if i#=-p# then m#=y# n#=y# end if if y# > m# then m# = y#: end if if y# < n# then n# = y#: end if if m#=y# or n#=y# then glColor3ub(255,200,200) setpixel(-x#/2+w, y#/2+h,1) glColor3ub(200,150,150) setpixel( x#/2+w, y#/2+h,1) end if i#=i#+st# next x#=x#+xs# next
SwapBuffers()
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 SetPixel(x,y,size#) glPointSize(size#) glBegin(GL_POINTS) glVertex2i(x,y) glEnd() End Sub
|
|
|
Post by Adam on Jul 21, 2015 19:35:34 GMT -5
That is really awesome!
|
|
|
My Ufo
Jul 22, 2015 13:21:15 GMT -5
Post by matthew on Jul 22, 2015 13:21:15 GMT -5
I agree, it looks like one of the alien spaceships from the film 'Close Encounters of the Third Kind'.
|
|