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 >
Wrap
BASIC Source File
|
1988-05-22
|
680b
|
27 lines
5 on error goto 1000
6 pena 1
10 scnclr
20 p = 160 : q = 100
30 xp = 144 : xr = 1.5*3.1415927
40 yp = 56 : yr = 1 : zp = 64
50 xf = xr / xp : yf = yp / yr : zf = xr / zp
60 for zi = - q to q - 1
70 if zi < - zp or zi > zp goto 150
80 zt = zi * xp / zp : zz = zi
90 xl = int (.5+sqr (xp*xp - zt*zt))
100 for xi = - xl to xl
110 xt = sqr (xi*xi+zt*zt)*xf : xx = xi
120 yy = (sin (xt)+.4 * sin(3*xt))*yf
130 gosub 170
140 next xi
150 next zi
170 x1 = xx + zz + p
180 y1 = yy - zz + q
190 locate ( x1,y1 )
200 if y1 = 0 goto 220
210 circle (x1,y1) , 360,0.5
211 end
220 return
1000 if err = 2 then ? err$ (2)
1010 end