home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 37.dms / 37.adf / cone4.bas < prev    next >
BASIC Source File  |  1988-05-22  |  680b  |  27 lines

  1. 5     on error goto 1000
  2. 6     pena 1
  3. 10    scnclr
  4. 20    p = 160 : q = 100 
  5. 30    xp = 144 : xr = 1.5*3.1415927
  6. 40    yp = 56 : yr = 1 : zp = 64
  7. 50    xf = xr / xp : yf = yp / yr : zf = xr / zp
  8. 60    for zi = - q to q - 1
  9. 70    if zi < - zp or zi > zp goto 150
  10. 80    zt = zi * xp / zp : zz = zi
  11. 90    xl = int (.5+sqr (xp*xp - zt*zt))
  12. 100   for xi = - xl to xl 
  13. 110   xt = sqr (xi*xi+zt*zt)*xf : xx = xi
  14. 120   yy = (sin (xt)+.4 * sin(3*xt))*yf
  15. 130   gosub 170
  16. 140   next xi
  17. 150   next zi
  18. 170   x1 = xx + zz + p
  19. 180   y1 = yy - zz + q
  20. 190   locate ( x1,y1 )
  21. 200   if y1 = 0 goto 220
  22. 210   circle (x1,y1) , 360,0.5 
  23. 211   end
  24. 220   return
  25. 1000  if err = 2 then ? err$ (2)
  26. 1010  end
  27.