  string title  = "UFO Plot"
  int width  =    800
  int height =    600
  uses     OpenglSceneFrame

  sub initialize(sys hWnd)
  ========================
  end sub


  sub Release(sys hwnd)
  =====================
  DeleteAllGlCompiled
  end sub

  sub scene(sys hWnd)
  ===================
  '
  static sys UFO
  static float _
  a     = 0.5     ,
  c     = 0.425   ,
  steps = 500     ,
  b     = a * a   ,
  xs    = a/steps ,
  ys    = c/steps ,
  ia    = 1/a     ,
  third = 1/3     ,
  i,m,n,p,q,r,s,x,y,st
  '
  '
  StillFrame
  glClearColor  0.3, 0, 0, 0
  gltranslatef  0,0,-1.0
  glColor3f .5, 1.0, 1.0 ' color 14
  glPointSize 2.0
  '
  BeginGlCompile UFO
  glBegin GL_POINTS
  for x = 0 to a step xs
    s  = x * x
    p  = sqr(b - s)
    st = 6*ys
    for i = -p to p step st
      r = sqr(s + i * i) *ia
      q = (r -1.0) * sin(24.0 * r)
      y = i*third + q * c
      if i=-p then
        m=y
        n=y
      end if
      if y > m then m = y  'top half
      if y < n then n = y  'bottom half
      if m = y or n = y then
        glVertex2f -x, y
        glVertex2f  x, y
      end if
    next
  next
  glEnd
  EndGlCompile
  '
  go UFO
  '
  end sub
